<?php
 pdo_query('CREATE TABLE IF NOT EXISTS `ims_tiny_wmall_account` (' . "\xa" . '  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,' . "\xa" . '  `uniacid` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `acid` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `uid` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `openid` varchar(50) NOT NULL,' . "\xa" . '  `username` varchar(50) NOT NULL,' . "\xa" . '  `password` varchar(32) NOT NULL,' . "\xa" . '  `salt` varchar(6) NOT NULL,' . "\xa" . '  `mobile` varchar(20) NOT NULL,' . "\xa" . '  `status` tinyint(3) NOT NULL DEFAULT \'2\',' . "\xa" . '  `store_id` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `joindate` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `joinip` varchar(15) NOT NULL DEFAULT \'\',' . "\xa" . '  `lastvisit` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `lastip` varchar(15) NOT NULL DEFAULT \'\',' . "\xa" . '  `remark` varchar(500) NOT NULL DEFAULT \'\',' . "\xa" . '  PRIMARY KEY (`id`),' . "\xa" . '  KEY `uniacid` (`uniacid`),' . "\xa" . '  KEY `uid` (`uid`)' . "\xa" . ') ENGINE=MyISAM DEFAULT CHARSET=utf8;' . "\xd\xa" . 'CREATE TABLE IF NOT EXISTS `ims_tiny_wmall_activity_coupon` (' . "\xa" . '  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,' . "\xa" . '  `uniacid` int(10) unsigned NOT NULL DEFAULT \'0\' COMMENT \'公号序号\',' . "\xa" . '  `sid` int(10) unsigned NOT NULL DEFAULT \'0\' COMMENT \'公号序号\',' . "\xa" . '  `type` tinyint(4) NOT NULL COMMENT \'优惠券类型. 1为折扣券, 2为代金券\',' . "\xa" . '  `title` varchar(30) NOT NULL DEFAULT \'\' COMMENT \'标题\',' . "\xa" . '  `discount` int(10) unsigned NOT NULL DEFAULT \'0\' COMMENT \'折扣券(折扣率), 代金券(面额)\',' . "\xa" . '  `condition` int(10) unsigned NOT NULL DEFAULT \'0\' COMMENT \'订单满多少可用\',' . "\xa" . '  `get_limit` int(10) NOT NULL DEFAULT \'1\' COMMENT \'每人限领\',' . "\xa" . '  `type_limit` int(10) NOT NULL DEFAULT \'1\' COMMENT \'1:所有用户都可领取,2:新用户可领取\',' . "\xa" . '  `use_limit` tinyint(3) unsigned NOT NULL DEFAULT \'1\',' . "\xa" . '  `grant_type` tinyint(3) unsigned NOT NULL DEFAULT \'1\',' . "\xa" . '  `dosage` int(10) unsigned NOT NULL DEFAULT \'0\' COMMENT \'已领取数量\',' . "\xa" . '  `amount` int(10) unsigned NOT NULL COMMENT \'总发行数量\',' . "\xa" . '  `status` tinyint(3) unsigned NOT NULL DEFAULT \'1\' COMMENT \'1:可领取,2:暂停领取\',' . "\xa" . '  `starttime` int(10) unsigned NOT NULL DEFAULT \'0\' COMMENT \'开始时间\',' . "\xa" . '  `endtime` int(10) unsigned NOT NULL DEFAULT \'0\' COMMENT \'结束时间\',' . "\xa" . '  `addtime` int(10) unsigned NOT NULL DEFAULT \'0\' COMMENT \'发行时间\',' . "\xa" . '  PRIMARY KEY (`id`),' . "\xa" . '  KEY `uniacid` (`uniacid`),' . "\xa" . '  KEY `sid` (`sid`)' . "\xa" . ') ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;' . "\xd\xa" . 'CREATE TABLE IF NOT EXISTS `ims_tiny_wmall_activity_coupon_grant_log` (' . "\xa" . '  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT \'序号\',' . "\xa" . '  `uniacid` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `sid` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `couponid` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `uid` int(10) unsigned NOT NULL COMMENT \'用户编号\',' . "\xa" . '  `grant_type` tinyint(3) NOT NULL DEFAULT \'1\' COMMENT \'状态: 1:一次性领取,2:每天领取 \',' . "\xa" . '  `addtime` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  PRIMARY KEY (`id`),' . "\xa" . '  KEY `uniacid` (`uniacid`),' . "\xa" . '  KEY `sid` (`sid`),' . "\xa" . '  KEY `couponid` (`couponid`),' . "\xa" . '  KEY `uid` (`uid`),' . "\xa" . '  KEY `addtime` (`addtime`)' . "\xa" . ') ENGINE=MyISAM AUTO_INCREMENT=115 DEFAULT CHARSET=utf8;' . "\xd\xa" . 'CREATE TABLE IF NOT EXISTS `ims_tiny_wmall_activity_coupon_record` (' . "\xa" . '  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT \'序号\',' . "\xa" . '  `uniacid` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `sid` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `couponid` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `uid` int(10) unsigned NOT NULL COMMENT \'用户编号\',' . "\xa" . '  `order_id` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `code` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `status` tinyint(3) NOT NULL DEFAULT \'1\' COMMENT \'状态: 1:未使用,2:已使用 \',' . "\xa" . '  `remark` varchar(300) NOT NULL DEFAULT \'\',' . "\xa" . '  `granttime` int(10) unsigned NOT NULL DEFAULT \'0\' COMMENT \'发放时间\',' . "\xa" . '  `usetime` int(10) unsigned NOT NULL DEFAULT \'0\' COMMENT \'使用时间\',' . "\xa" . '  PRIMARY KEY (`id`),' . "\xa" . '  KEY `uniacid` (`uniacid`),' . "\xa" . '  KEY `sid` (`sid`),' . "\xa" . '  KEY `couponid` (`couponid`),' . "\xa" . '  KEY `uid` (`uid`)' . "\xa" . ') ENGINE=MyISAM AUTO_INCREMENT=115 DEFAULT CHARSET=utf8;' . "\xd\xa" . 'CREATE TABLE IF NOT EXISTS `ims_tiny_wmall_address` (' . "\xa" . '  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,' . "\xa" . '  `uniacid` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `uid` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `realname` varchar(15) NOT NULL,' . "\xa" . '  `sex` varchar(10) NOT NULL,' . "\xa" . '  `mobile` varchar(15) NOT NULL,' . "\xa" . '  `address` varchar(50) NOT NULL,' . "\xa" . '  `number` varchar(20) NOT NULL,' . "\xa" . '  `location_x` varchar(20) NOT NULL,' . "\xa" . '  `location_y` varchar(20) NOT NULL,' . "\xa" . '  `is_default` tinyint(3) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  PRIMARY KEY (`id`),' . "\xa" . '  KEY `uniacid` (`uniacid`),' . "\xa" . '  KEY `uid` (`uid`)' . "\xa" . ') ENGINE=MyISAM AUTO_INCREMENT=143 DEFAULT CHARSET=utf8;' . "\xd\xa" . 'CREATE TABLE IF NOT EXISTS `ims_tiny_wmall_article` (' . "\xa" . '  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,' . "\xa" . '  `uniacid` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `cateid` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `title` varchar(100) NOT NULL DEFAULT \'\',' . "\xa" . '  `thumb` varchar(255) NOT NULL,' . "\xa" . '  `content` mediumtext NOT NULL,' . "\xa" . '  `displayorder` tinyint(3) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `status` tinyint(3) unsigned NOT NULL DEFAULT \'1\',' . "\xa" . '  `createtime` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `click` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  PRIMARY KEY (`id`),' . "\xa" . '  KEY `title` (`title`),' . "\xa" . '  KEY `uniacid` (`uniacid`),' . "\xa" . '  KEY `cateid` (`cateid`)' . "\xa" . ') ENGINE=MyISAM DEFAULT CHARSET=utf8;' . "\xd\xa" . 'CREATE TABLE IF NOT EXISTS `ims_tiny_wmall_article_category` (' . "\xa" . '  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,' . "\xa" . '  `uniacid` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `title` varchar(30) NOT NULL,' . "\xa" . '  `status` tinyint(3) unsigned NOT NULL DEFAULT \'1\',' . "\xa" . '  `displayorder` tinyint(3) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  PRIMARY KEY (`id`),' . "\xa" . '  KEY `uniacid` (`uniacid`)' . "\xa" . ') ENGINE=MyISAM DEFAULT CHARSET=utf8;' . "\xd\xa" . 'CREATE TABLE IF NOT EXISTS `ims_tiny_wmall_assign_board` (' . "\xa" . '  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,' . "\xa" . '  `uniacid` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `sid` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `queue_id` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `uid` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `mobile` varchar(15) NOT NULL,' . "\xa" . '  `openid` varchar(64) NOT NULL,' . "\xa" . '  `guest_num` tinyint(3) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `number` varchar(20) NOT NULL,' . "\xa" . '  `position` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `status` tinyint(3) unsigned NOT NULL DEFAULT \'1\',' . "\xa" . '  `is_notify` tinyint(3) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `createtime` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  PRIMARY KEY (`id`),' . "\xa" . '  KEY `uniacid` (`uniacid`),' . "\xa" . '  KEY `sid` (`sid`)' . "\xa" . ') ENGINE=MyISAM DEFAULT CHARSET=utf8;' . "\xd\xa" . 'CREATE TABLE IF NOT EXISTS `ims_tiny_wmall_assign_queue` (' . "\xa" . '  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,' . "\xa" . '  `uniacid` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `sid` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `title` varchar(20) NOT NULL,' . "\xa" . '  `guest_num` tinyint(3) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `notify_num` tinyint(3) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `starttime` varchar(10) NOT NULL,' . "\xa" . '  `endtime` varchar(10) NOT NULL,' . "\xa" . '  `prefix` varchar(10) NOT NULL COMMENT \'前缀\',' . "\xa" . '  `status` tinyint(3) unsigned NOT NULL DEFAULT \'1\',' . "\xa" . '  `position` int(10) unsigned NOT NULL DEFAULT \'1\',' . "\xa" . '  `updatetime` int(10) unsigned NOT NULL DEFAULT \'0\' COMMENT \'根据这个时间,判断是否将position重新至0\',' . "\xa" . '  PRIMARY KEY (`id`),' . "\xa" . '  KEY `uniacid` (`uniacid`),' . "\xa" . '  KEY `sid` (`sid`)' . "\xa" . ') ENGINE=MyISAM DEFAULT CHARSET=utf8;' . "\xd\xa" . 'CREATE TABLE IF NOT EXISTS `ims_tiny_wmall_black` (' . "\xa" . '  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,' . "\xa" . '  `from` varchar(255) NOT NULL,' . "\xa" . '  `to` varchar(255) NOT NULL,' . "\xa" . '  `type` tinyint(3) unsigned NOT NULL DEFAULT \'1\' COMMENT \'1传播,2:盗版\',' . "\xa" . '  `addtime` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `addtime_cn` varchar(30) NOT NULL,' . "\xa" . '  PRIMARY KEY (`id`),' . "\xa" . '  KEY `from` (`from`),' . "\xa" . '  KEY `to` (`to`)' . "\xa" . ') ENGINE=MyISAM DEFAULT CHARSET=utf8;' . "\xd\xa" . 'CREATE TABLE IF NOT EXISTS `ims_tiny_wmall_clerk` (' . "\xa" . '  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,' . "\xa" . '  `uniacid` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `sid` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `role` varchar(15) NOT NULL DEFAULT \'clerk\',' . "\xa" . '  `title` varchar(15) NOT NULL,' . "\xa" . '  `nickname` varchar(15) NOT NULL,' . "\xa" . '  `openid` varchar(60) NOT NULL,' . "\xa" . '  `mobile` varchar(20) NOT NULL,' . "\xa" . '  `password` varchar(32) NOT NULL,' . "\xa" . '  `salt` varchar(6) NOT NULL,' . "\xa" . '  `status` tinyint(3) unsigned NOT NULL DEFAULT \'1\',' . "\xa" . '  `addtime` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  PRIMARY KEY (`id`),' . "\xa" . '  KEY `uniacid` (`uniacid`),' . "\xa" . '  KEY `sid` (`sid`)' . "\xa" . ') ENGINE=MyISAM AUTO_INCREMENT=16 DEFAULT CHARSET=utf8;' . "\xd\xa" . 'CREATE TABLE IF NOT EXISTS `ims_tiny_wmall_config` (' . "\xa" . '  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,' . "\xa" . '  `uniacid` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `title` varchar(25) NOT NULL,' . "\xa" . '  `mobile` varchar(25) NOT NULL,' . "\xa" . '  `content` varchar(255) NOT NULL,' . "\xa" . '  `thumb` varchar(100) NOT NULL,' . "\xa" . '  `followurl` varchar(100) NOT NULL,' . "\xa" . '  `public_tpl` varchar(200) NOT NULL,' . "\xa" . '  `notice` varchar(1000) NOT NULL,' . "\xa" . '  `version` tinyint(3) unsigned NOT NULL DEFAULT \'1\',' . "\xa" . '  `default_sid` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `sms` varchar(1000) NOT NULL,' . "\xa" . '  `imgnav_status` tinyint(3) unsigned NOT NULL DEFAULT \'1\',' . "\xa" . '  `imgnav_data` varchar(3000) NOT NULL,' . "\xa" . '  `copyright` varchar(1500) NOT NULL,' . "\xa" . '  `payment` varchar(1000) NOT NULL,' . "\xa" . '  `manager` varchar(500) NOT NULL,' . "\xa" . '  `credit` varchar(255) NOT NULL,' . "\xa" . '  `report` varchar(2000) NOT NULL,' . "\xa" . '  PRIMARY KEY (`id`),' . "\xa" . '  KEY `uniacid` (`uniacid`)' . "\xa" . ') ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;' . "\xd\xa" . 'CREATE TABLE IF NOT EXISTS `ims_tiny_wmall_delivery_cards` (' . "\xa" . '  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,' . "\xa" . '  `uniacid` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `title` varchar(20) NOT NULL,' . "\xa" . '  `days` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `price` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `day_free_limit` tinyint(3) unsigned NOT NULL DEFAULT \'2\',' . "\xa" . '  `displayorder` tinyint(3) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `status` tinyint(3) unsigned NOT NULL DEFAULT \'1\',' . "\xa" . '  PRIMARY KEY (`id`),' . "\xa" . '  KEY `uniacid` (`uniacid`)' . "\xa" . ') ENGINE=MyISAM DEFAULT CHARSET=utf8;' . "\xd\xa" . 'CREATE TABLE IF NOT EXISTS `ims_tiny_wmall_delivery_cards_order` (' . "\xa" . '  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,' . "\xa" . '  `uniacid` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `acid` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `uid` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `openid` varchar(60) NOT NULL,' . "\xa" . '  `ordersn` varchar(20) NOT NULL,' . "\xa" . '  `card_id` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `final_fee` varchar(20) NOT NULL,' . "\xa" . '  `pay_type` varchar(20) NOT NULL,' . "\xa" . '  `is_pay` tinyint(3) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `addtime` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `paytime` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `starttime` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `endtime` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  PRIMARY KEY (`id`),' . "\xa" . '  KEY `uniacid` (`uniacid`),' . "\xa" . '  KEY `uid` (`uid`)' . "\xa" . ') ENGINE=MyISAM DEFAULT CHARSET=utf8;' . "\xd\xa" . 'CREATE TABLE IF NOT EXISTS `ims_tiny_wmall_delivery_config` (' . "\xa" . '  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,' . "\xa" . '  `uniacid` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `mobile_verify_status` tinyint(3) unsigned NOT NULL DEFAULT \'2\',' . "\xa" . '  `agreement` text NOT NULL,' . "\xa" . '  `delivery_type` tinyint(3) unsigned NOT NULL DEFAULT \'1\',' . "\xa" . '  `plateform_delivery_fee` tinyint(3) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `delivery_fee_type` tinyint(3) unsigned NOT NULL DEFAULT \'1\',' . "\xa" . '  `delivery_fee` varchar(10) NOT NULL,' . "\xa" . '  `get_cash_fee_limit` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `get_cash_fee_rate` varchar(10) NOT NULL,' . "\xa" . '  `get_cash_fee_min` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `get_cash_fee_max` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `card_apply_status` tinyint(3) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `card_agreement` text NOT NULL,' . "\xa" . '  PRIMARY KEY (`id`),' . "\xa" . '  KEY `uniacid` (`uniacid`)' . "\xa" . ') ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;' . "\xd\xa" . 'CREATE TABLE IF NOT EXISTS `ims_tiny_wmall_deliveryer` (' . "\xa" . '  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,' . "\xa" . '  `uniacid` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `title` varchar(15) NOT NULL,' . "\xa" . '  `nickname` varchar(15) NOT NULL,' . "\xa" . '  `openid` varchar(60) NOT NULL,' . "\xa" . '  `avatar` varchar(255) NOT NULL,' . "\xa" . '  `mobile` varchar(15) NOT NULL,' . "\xa" . '  `password` varchar(32) NOT NULL,' . "\xa" . '  `salt` varchar(6) NOT NULL,' . "\xa" . '  `sex` varchar(5) NOT NULL,' . "\xa" . '  `age` tinyint(3) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `addtime` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `credit1` decimal(10,2) unsigned NOT NULL DEFAULT \'0.00\',' . "\xa" . '  `credit2` decimal(10,2) unsigned NOT NULL DEFAULT \'0.00\',' . "\xa" . '  PRIMARY KEY (`id`),' . "\xa" . '  KEY `uniacid` (`uniacid`)' . "\xa" . ') ENGINE=MyISAM AUTO_INCREMENT=7 DEFAULT CHARSET=utf8;' . "\xd\xa" . 'CREATE TABLE IF NOT EXISTS `ims_tiny_wmall_deliveryer_current_log` (' . "\xa" . '  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,' . "\xa" . '  `uniacid` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `deliveryer_id` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `trade_type` tinyint(3) unsigned NOT NULL DEFAULT \'1\' COMMENT \'1:订单入账, 2: 申请提现\',' . "\xa" . '  `extra` varchar(255) NOT NULL,' . "\xa" . '  `fee` decimal(10,2) NOT NULL DEFAULT \'0.00\',' . "\xa" . '  `amount` decimal(10,2) NOT NULL DEFAULT \'0.00\',' . "\xa" . '  `addtime` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `remark` varchar(255) NOT NULL,' . "\xa" . '  PRIMARY KEY (`id`),' . "\xa" . '  KEY `deliveryer_id` (`deliveryer_id`),' . "\xa" . '  KEY `uniacid` (`uniacid`)' . "\xa" . ') ENGINE=MyISAM DEFAULT CHARSET=utf8;' . "\xd\xa" . 'CREATE TABLE IF NOT EXISTS `ims_tiny_wmall_deliveryer_getcash_log` (' . "\xa" . '  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,' . "\xa" . '  `uniacid` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `deliveryer_id` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `trade_no` varchar(20) NOT NULL,' . "\xa" . '  `get_fee` decimal(10,2) unsigned NOT NULL DEFAULT \'0.00\',' . "\xa" . '  `take_fee` decimal(10,2) unsigned NOT NULL DEFAULT \'0.00\',' . "\xa" . '  `final_fee` decimal(10,2) unsigned NOT NULL DEFAULT \'0.00\',' . "\xa" . '  `status` tinyint(3) unsigned NOT NULL DEFAULT \'2\' COMMENT \'1:申请成功,2:申请中\',' . "\xa" . '  `addtime` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `endtime` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  PRIMARY KEY (`id`),' . "\xa" . '  KEY `uniacid` (`uniacid`),' . "\xa" . '  KEY `deliveryer_id` (`deliveryer_id`)' . "\xa" . ') ENGINE=MyISAM DEFAULT CHARSET=utf8;' . "\xd\xa" . 'CREATE TABLE IF NOT EXISTS `ims_tiny_wmall_fans` (' . "\xa" . '  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,' . "\xa" . '  `uniacid` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `uid` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `openid` varchar(50) NOT NULL,' . "\xa" . '  `nickname` varchar(30) NOT NULL,' . "\xa" . '  `sex` varchar(3) NOT NULL,' . "\xa" . '  `avatar` varchar(255) NOT NULL,' . "\xa" . '  `addtime` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  PRIMARY KEY (`id`),' . "\xa" . '  KEY `uniacid` (`uniacid`),' . "\xa" . '  KEY `uid` (`uid`)' . "\xa" . ') ENGINE=MyISAM AUTO_INCREMENT=23 DEFAULT CHARSET=utf8;' . "\xd\xa" . 'CREATE TABLE IF NOT EXISTS `ims_tiny_wmall_goods` (' . "\xa" . '  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,' . "\xa" . '  `uniacid` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `sid` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `cid` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `title` varchar(30) NOT NULL,' . "\xa" . '  `price` varchar(500) NOT NULL,' . "\xa" . '  `discount_price` varchar(500) NOT NULL,' . "\xa" . '  `is_options` tinyint(3) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `unitname` varchar(10) NOT NULL DEFAULT \'份\',' . "\xa" . '  `total` int(10) NOT NULL DEFAULT \'0\',' . "\xa" . '  `sailed` int(10) unsigned NOT NULL,' . "\xa" . '  `status` tinyint(3) unsigned NOT NULL DEFAULT \'1\',' . "\xa" . '  `is_hot` tinyint(3) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `thumb` varchar(255) NOT NULL,' . "\xa" . '  `label` varchar(5) NOT NULL,' . "\xa" . '  `displayorder` tinyint(3) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `description` text NOT NULL,' . "\xa" . '  `comment_total` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `comment_good` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  PRIMARY KEY (`id`),' . "\xa" . '  KEY `uniacid` (`uniacid`),' . "\xa" . '  KEY `sid` (`sid`),' . "\xa" . '  KEY `cid` (`cid`)' . "\xa" . ') ENGINE=MyISAM AUTO_INCREMENT=130 DEFAULT CHARSET=utf8;' . "\xd\xa" . 'CREATE TABLE IF NOT EXISTS `ims_tiny_wmall_goods_category` (' . "\xa" . '  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,' . "\xa" . '  `uniacid` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `sid` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `title` varchar(20) NOT NULL,' . "\xa" . '  `status` tinyint(3) unsigned NOT NULL DEFAULT \'1\',' . "\xa" . '  `displayorder` tinyint(3) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  PRIMARY KEY (`id`),' . "\xa" . '  KEY `uniacid` (`uniacid`),' . "\xa" . '  KEY `sid` (`sid`)' . "\xa" . ') ENGINE=MyISAM AUTO_INCREMENT=30 DEFAULT CHARSET=utf8;' . "\xd\xa" . 'CREATE TABLE IF NOT EXISTS `ims_tiny_wmall_goods_options` (' . "\xa" . '  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,' . "\xa" . '  `uniacid` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `sid` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `goods_id` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `name` varchar(50) NOT NULL,' . "\xa" . '  `price` varchar(50) NOT NULL,' . "\xa" . '  `total` int(10) NOT NULL DEFAULT \'-1\',' . "\xa" . '  `displayorder` tinyint(3) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  PRIMARY KEY (`id`),' . "\xa" . '  KEY `uniacid` (`uniacid`),' . "\xa" . '  KEY `sid` (`sid`),' . "\xa" . '  KEY `goods_id` (`goods_id`)' . "\xa" . ') ENGINE=MyISAM AUTO_INCREMENT=153 DEFAULT CHARSET=utf8;' . "\xd\xa" . 'CREATE TABLE IF NOT EXISTS `ims_tiny_wmall_members` (' . "\xa" . '  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,' . "\xa" . '  `uniacid` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `uid` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `openid` varchar(50) NOT NULL,' . "\xa" . '  `avatar` varchar(255) NOT NULL,' . "\xa" . '  `nickname` varchar(50) NOT NULL,' . "\xa" . '  `sex` varchar(5) NOT NULL,' . "\xa" . '  `realname` varchar(20) NOT NULL,' . "\xa" . '  `mobile` varchar(20) NOT NULL,' . "\xa" . '  `setmeal_id` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `setmeal_day_free_limit` tinyint(3) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `setmeal_starttime` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `setmeal_endtime` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `first_order_time` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `last_order_time` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `success_num` int(10) unsigned DEFAULT \'0\',' . "\xa" . '  `success_price` varchar(20) NOT NULL DEFAULT \'0.00\',' . "\xa" . '  `cancel_num` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `cancel_price` varchar(20) NOT NULL DEFAULT \'0.00\',' . "\xa" . '  `is_sys` tinyint(3) unsigned NOT NULL DEFAULT \'1\' COMMENT \'1:系统会员, 2:模块兼容会员\',' . "\xa" . '  `search_data` varchar(255) NOT NULL,' . "\xa" . '  `addtime` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  PRIMARY KEY (`id`),' . "\xa" . '  KEY `uniacid` (`uniacid`),' . "\xa" . '  KEY `first_order_time` (`first_order_time`),' . "\xa" . '  KEY `last_order_time` (`last_order_time`)' . "\xa" . ') ENGINE=MyISAM AUTO_INCREMENT=182 DEFAULT CHARSET=utf8;' . "\xd\xa" . 'CREATE TABLE IF NOT EXISTS `ims_tiny_wmall_order` (' . "\xa" . '  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,' . "\xa" . '  `uniacid` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `acid` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `sid` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `uid` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `groupid` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `order_type` tinyint(3) unsigned NOT NULL DEFAULT \'1\',' . "\xa" . '  `is_pay` tinyint(3) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `ordersn` varchar(20) NOT NULL,' . "\xa" . '  `code` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `openid` varchar(50) NOT NULL,' . "\xa" . '  `username` varchar(20) NOT NULL,' . "\xa" . '  `sex` varchar(5) NOT NULL,' . "\xa" . '  `mobile` varchar(15) NOT NULL,' . "\xa" . '  `address` varchar(100) NOT NULL,' . "\xa" . '  `number` varchar(20) NOT NULL,' . "\xa" . '  `location_x` varchar(20) NOT NULL,' . "\xa" . '  `location_y` varchar(20) NOT NULL,' . "\xa" . '  `note` varchar(200) NOT NULL,' . "\xa" . '  `price` decimal(10,2) NOT NULL,' . "\xa" . '  `num` tinyint(3) unsigned NOT NULL,' . "\xa" . '  `delivery_day` varchar(20) NOT NULL,' . "\xa" . '  `delivery_time` varchar(15) NOT NULL,' . "\xa" . '  `pay_type` varchar(15) NOT NULL,' . "\xa" . '  `addtime` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `paytime` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `deliveryingtime` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `deliveryedtime` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `status` tinyint(3) NOT NULL DEFAULT \'1\',' . "\xa" . '  `delivery_status` tinyint(3) unsigned NOT NULL DEFAULT \'0\' COMMENT \'3:待配送, 4:配送中, 5: 配送成功, 6: 配送失败\',' . "\xa" . '  `delivery_type` tinyint(3) unsigned NOT NULL DEFAULT \'1\',' . "\xa" . '  `is_comment` tinyint(3) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `print_nums` tinyint(3) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `delivery_fee` decimal(10,2) unsigned NOT NULL DEFAULT \'0.00\' COMMENT \'外卖配送费\',' . "\xa" . '  `pack_fee` decimal(10,2) unsigned NOT NULL DEFAULT \'0.00\',' . "\xa" . '  `discount_fee` varchar(20) NOT NULL DEFAULT \'0.00\',' . "\xa" . '  `total_fee` varchar(20) NOT NULL DEFAULT \'0.00\',' . "\xa" . '  `final_fee` varchar(20) NOT NULL DEFAULT \'0.00\',' . "\xa" . '  `vip_free_delivery_fee` tinyint(3) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `invoice` varchar(50) NOT NULL,' . "\xa" . '  `data` varchar(1000) NOT NULL,' . "\xa" . '  `is_remind` tinyint(3) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `deliveryer_id` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `is_refund` tinyint(3) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `person_num` tinyint(3) unsigned NOT NULL DEFAULT \'1\',' . "\xa" . '  `table_id` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `table_cid` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `reserve_type` varchar(10) NOT NULL,' . "\xa" . '  `reserve_time` varchar(30) NOT NULL,' . "\xa" . '  PRIMARY KEY (`id`),' . "\xa" . '  KEY `uniacid_sid` (`uniacid`,`sid`)' . "\xa" . ') ENGINE=MyISAM AUTO_INCREMENT=202 DEFAULT CHARSET=utf8;' . "\xd\xa" . 'CREATE TABLE IF NOT EXISTS `ims_tiny_wmall_order_cart` (' . "\xa" . '  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,' . "\xa" . '  `uniacid` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `sid` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `uid` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `groupid` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `num` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `price` decimal(10,2) unsigned NOT NULL DEFAULT \'0.00\',' . "\xa" . '  `data` varchar(5000) NOT NULL,' . "\xa" . '  `num_data` varchar(2000) NOT NULL,' . "\xa" . '  `addtime` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  PRIMARY KEY (`id`),' . "\xa" . '  KEY `uniacid_sid` (`uniacid`,`sid`),' . "\xa" . '  KEY `uid` (`uniacid`,`uid`)' . "\xa" . ') ENGINE=MyISAM AUTO_INCREMENT=271 DEFAULT CHARSET=utf8;' . "\xd\xa" . 'CREATE TABLE IF NOT EXISTS `ims_tiny_wmall_order_comment` (' . "\xa" . '  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,' . "\xa" . '  `uniacid` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `oid` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `uid` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `sid` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `username` varchar(20) NOT NULL,' . "\xa" . '  `avatar` varchar(255) NOT NULL,' . "\xa" . '  `mobile` varchar(15) NOT NULL,' . "\xa" . '  `goods_quality` tinyint(3) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `delivery_service` tinyint(3) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `score` tinyint(3) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `note` varchar(255) NOT NULL,' . "\xa" . '  `data` varchar(1000) NOT NULL,' . "\xa" . '  `thumbs` varchar(3000) NOT NULL,' . "\xa" . '  `reply` varchar(500) NOT NULL,' . "\xa" . '  `replytime` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `status` tinyint(3) unsigned NOT NULL DEFAULT \'1\',' . "\xa" . '  `addtime` int(10) NOT NULL DEFAULT \'0\',' . "\xa" . '  PRIMARY KEY (`id`),' . "\xa" . '  KEY `uniacid` (`uniacid`),' . "\xa" . '  KEY `sid` (`sid`),' . "\xa" . '  KEY `oid` (`oid`),' . "\xa" . '  KEY `addtime` (`addtime`)' . "\xa" . ') ENGINE=MyISAM AUTO_INCREMENT=16 DEFAULT CHARSET=utf8;' . "\xd\xa" . 'CREATE TABLE IF NOT EXISTS `ims_tiny_wmall_order_current_log` (' . "\xa" . '  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,' . "\xa" . '  `uniacid` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `acid` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `sid` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `uid` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `openid` varchar(50) NOT NULL,' . "\xa" . '  `username` varchar(20) NOT NULL,' . "\xa" . '  `mobile` varchar(20) NOT NULL,' . "\xa" . '  `orderid` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `fee` decimal(10,2) unsigned NOT NULL DEFAULT \'0.00\',' . "\xa" . '  `is_pay` tinyint(3) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `pay_type` varchar(15) NOT NULL,' . "\xa" . '  `order_status` tinyint(3) unsigned NOT NULL DEFAULT \'1\' COMMENT \'订单状态\',' . "\xa" . '  `trade_status` tinyint(3) unsigned NOT NULL DEFAULT \'2\' COMMENT \'交易记录1:成功,2:进行中,3:失败,4:交易关闭.\',' . "\xa" . '  `addtime` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `remark` varchar(255) NOT NULL,' . "\xa" . '  `out_trade_no` varchar(40) NOT NULL COMMENT \'商户支付订单号\',' . "\xa" . '  `out_refund_no` varchar(40) NOT NULL COMMENT \'商户退款订单号\',' . "\xa" . '  `refund_status` tinyint(3) unsigned NOT NULL DEFAULT \'0\' COMMENT \'1:申请中, 2:退款中, 3:退款成功, 4:退款失败\',' . "\xa" . '  `refund_time` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `refund_channel` varchar(20) NOT NULL,' . "\xa" . '  `refund_account` varchar(50) NOT NULL,' . "\xa" . '  `delivery_type` tinyint(3) unsigned NOT NULL DEFAULT \'1\',' . "\xa" . '  `deliveryer_id` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `deliveryer_fee` varchar(10) NOT NULL,' . "\xa" . '  `store_deliveryer_fee` varchar(10) NOT NULL,' . "\xa" . '  `vip_free_delivery_fee` tinyint(3) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `final_fee` decimal(10,2) NOT NULL DEFAULT \'0.00\',' . "\xa" . '  PRIMARY KEY (`id`),' . "\xa" . '  KEY `uniacid` (`uniacid`),' . "\xa" . '  KEY `sid` (`sid`)' . "\xa" . ') ENGINE=MyISAM AUTO_INCREMENT=202 DEFAULT CHARSET=utf8;' . "\xd\xa" . 'CREATE TABLE IF NOT EXISTS `ims_tiny_wmall_order_discount` (' . "\xa" . '  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,' . "\xa" . '  `uniacid` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `sid` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `oid` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `type` varchar(20) NOT NULL,' . "\xa" . '  `name` varchar(20) NOT NULL,' . "\xa" . '  `icon` varchar(20) NOT NULL,' . "\xa" . '  `note` varchar(50) NOT NULL,' . "\xa" . '  `fee` varchar(20) NOT NULL DEFAULT \'0.00\',' . "\xa" . '  PRIMARY KEY (`id`)' . "\xa" . ') ENGINE=MyISAM AUTO_INCREMENT=99 DEFAULT CHARSET=utf8;' . "\xd\xa" . 'CREATE TABLE IF NOT EXISTS `ims_tiny_wmall_order_print_log` (' . "\xa" . '  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,' . "\xa" . '  `uniacid` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `sid` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `pid` tinyint(3) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `oid` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `foid` varchar(50) NOT NULL,' . "\xa" . '  `status` tinyint(3) unsigned NOT NULL DEFAULT \'2\' COMMENT \'1:打印成功,2:打印未成功\',' . "\xa" . '  `printer_type` varchar(20) NOT NULL DEFAULT \'feie\',' . "\xa" . '  `addtime` int(10) unsigned NOT NULL,' . "\xa" . '  PRIMARY KEY (`id`),' . "\xa" . '  KEY `addtime` (`addtime`),' . "\xa" . '  KEY `foid` (`foid`),' . "\xa" . '  KEY `uniacid` (`uniacid`),' . "\xa" . '  KEY `pid` (`pid`)' . "\xa" . ') ENGINE=MyISAM AUTO_INCREMENT=101 DEFAULT CHARSET=utf8;' . "\xd\xa" . 'CREATE TABLE IF NOT EXISTS `ims_tiny_wmall_order_refund_log` (' . "\xa" . '  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,' . "\xa" . '  `uniacid` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `sid` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `oid` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `status` tinyint(3) unsigned NOT NULL DEFAULT \'1\',' . "\xa" . '  `type` varchar(20) NOT NULL,' . "\xa" . '  `title` varchar(30) NOT NULL,' . "\xa" . '  `note` varchar(255) NOT NULL,' . "\xa" . '  `addtime` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  PRIMARY KEY (`id`),' . "\xa" . '  KEY `uniacid` (`uniacid`),' . "\xa" . '  KEY `sid` (`sid`),' . "\xa" . '  KEY `oid` (`oid`)' . "\xa" . ') ENGINE=MyISAM DEFAULT CHARSET=utf8;' . "\xd\xa" . 'CREATE TABLE IF NOT EXISTS `ims_tiny_wmall_order_stat` (' . "\xa" . '  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,' . "\xa" . '  `oid` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `uniacid` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `sid` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `goods_id` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `goods_cid` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `goods_num` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `goods_title` varchar(30) NOT NULL,' . "\xa" . '  `goods_unit_price` varchar(10) NOT NULL,' . "\xa" . '  `goods_price` decimal(10,2) unsigned NOT NULL DEFAULT \'0.00\',' . "\xa" . '  `status` tinyint(3) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `addtime` int(10) NOT NULL DEFAULT \'0\',' . "\xa" . '  PRIMARY KEY (`id`),' . "\xa" . '  KEY `uniacid` (`uniacid`),' . "\xa" . '  KEY `sid` (`sid`),' . "\xa" . '  KEY `addtime` (`addtime`)' . "\xa" . ') ENGINE=MyISAM AUTO_INCREMENT=748 DEFAULT CHARSET=utf8;' . "\xd\xa" . 'CREATE TABLE IF NOT EXISTS `ims_tiny_wmall_order_status_log` (' . "\xa" . '  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,' . "\xa" . '  `uniacid` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `sid` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `oid` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `status` tinyint(3) unsigned NOT NULL DEFAULT \'1\',' . "\xa" . '  `type` varchar(20) NOT NULL,' . "\xa" . '  `title` varchar(30) NOT NULL,' . "\xa" . '  `note` varchar(255) NOT NULL,' . "\xa" . '  `addtime` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  PRIMARY KEY (`id`),' . "\xa" . '  KEY `uniacid` (`uniacid`),' . "\xa" . '  KEY `sid` (`sid`),' . "\xa" . '  KEY `oid` (`oid`)' . "\xa" . ') ENGINE=MyISAM AUTO_INCREMENT=1325 DEFAULT CHARSET=utf8;' . "\xd\xa" . 'CREATE TABLE IF NOT EXISTS `ims_tiny_wmall_paylog` (' . "\xa" . '  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,' . "\xa" . '  `uniacid` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `order_sn` varchar(20) NOT NULL,' . "\xa" . '  `order_id` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `order_type` varchar(10) NOT NULL,' . "\xa" . '  `fee` varchar(10) NOT NULL,' . "\xa" . '  `status` tinyint(3) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `addtime` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `paytime` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  PRIMARY KEY (`id`),' . "\xa" . '  KEY `uniacid` (`uniacid`)' . "\xa" . ') ENGINE=MyISAM DEFAULT CHARSET=utf8;' . "\xd\xa" . 'CREATE TABLE IF NOT EXISTS `ims_tiny_wmall_printer` (' . "\xa" . '  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,' . "\xa" . '  `uniacid` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `sid` int(10) unsigned NOT NULL,' . "\xa" . '  `name` varchar(20) NOT NULL,' . "\xa" . '  `type` varchar(20) NOT NULL DEFAULT \'feie\',' . "\xa" . '  `print_no` varchar(30) NOT NULL,' . "\xa" . '  `member_code` varchar(50) NOT NULL COMMENT \'飞蛾打印机机器号\',' . "\xa" . '  `key` varchar(30) NOT NULL,' . "\xa" . '  `api_key` varchar(100) NOT NULL COMMENT \'易联云打印机api_key\',' . "\xa" . '  `print_nums` tinyint(3) unsigned NOT NULL DEFAULT \'1\',' . "\xa" . '  `qrcode_link` varchar(100) NOT NULL,' . "\xa" . '  `print_header` varchar(50) NOT NULL,' . "\xa" . '  `print_footer` varchar(50) NOT NULL,' . "\xa" . '  `status` tinyint(3) unsigned NOT NULL DEFAULT \'1\',' . "\xa" . '  `delivery_type_w6muyouwlcom_195` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  PRIMARY KEY (`id`),' . "\xa" . '  KEY `uniacid` (`uniacid`),' . "\xa" . '  KEY `sid` (`sid`)' . "\xa" . ') ENGINE=MyISAM AUTO_INCREMENT=6 DEFAULT CHARSET=utf8;' . "\xd\xa" . 'CREATE TABLE IF NOT EXISTS `ims_tiny_wmall_reply` (' . "\xa" . '  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,' . "\xa" . '  `uniacid` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `sid` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `rid` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `type` varchar(50) DEFAULT NULL,' . "\xa" . '  `table_id` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  PRIMARY KEY (`id`),' . "\xa" . '  KEY `uniacid` (`uniacid`)' . "\xa" . ') ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;' . "\xd\xa" . 'CREATE TABLE IF NOT EXISTS `ims_tiny_wmall_report` (' . "\xa" . '  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,' . "\xa" . '  `uniacid` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `acid` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `sid` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `uid` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `openid` varchar(50) NOT NULL,' . "\xa" . '  `mobile` varchar(20) NOT NULL,' . "\xa" . '  `title` varchar(255) NOT NULL,' . "\xa" . '  `note` varchar(255) NOT NULL,' . "\xa" . '  `thumbs` varchar(2000) NOT NULL,' . "\xa" . '  `status` tinyint(3) NOT NULL DEFAULT \'0\',' . "\xa" . '  `addtime` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  PRIMARY KEY (`id`),' . "\xa" . '  KEY `uniacid` (`uniacid`),' . "\xa" . '  KEY `sid` (`sid`)' . "\xa" . ') ENGINE=MyISAM DEFAULT CHARSET=utf8;' . "\xd\xa" . 'CREATE TABLE IF NOT EXISTS `ims_tiny_wmall_reserve` (' . "\xa" . '  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,' . "\xa" . '  `uniacid` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `sid` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `time` varchar(15) NOT NULL,' . "\xa" . '  `table_cid` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `addtime` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  PRIMARY KEY (`id`),' . "\xa" . '  KEY `uniacid` (`uniacid`),' . "\xa" . '  KEY `sid` (`sid`)' . "\xa" . ') ENGINE=MyISAM AUTO_INCREMENT=17 DEFAULT CHARSET=utf8;' . "\xd\xa" . 'CREATE TABLE IF NOT EXISTS `ims_tiny_wmall_slide` (' . "\xa" . '  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,' . "\xa" . '  `uniacid` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `title` varchar(30) NOT NULL,' . "\xa" . '  `thumb` varchar(255) NOT NULL,' . "\xa" . '  `link` varchar(255) NOT NULL,' . "\xa" . '  `type` tinyint(3) unsigned NOT NULL DEFAULT \'1\',' . "\xa" . '  `status` tinyint(3) unsigned NOT NULL DEFAULT \'1\',' . "\xa" . '  PRIMARY KEY (`id`),' . "\xa" . '  KEY `uniacid` (`uniacid`)' . "\xa" . ') ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;' . "\xd\xa" . 'CREATE TABLE IF NOT EXISTS `ims_tiny_wmall_sms_send_log` (' . "\xa" . '  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,' . "\xa" . '  `uniacid` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `sid` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `type` varchar(20) NOT NULL,' . "\xa" . '  `mobile` varchar(20) NOT NULL,' . "\xa" . '  `sendtime` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  PRIMARY KEY (`id`),' . "\xa" . '  KEY `uniacid` (`uniacid`),' . "\xa" . '  KEY `sid` (`sid`)' . "\xa" . ') ENGINE=MyISAM AUTO_INCREMENT=16 DEFAULT CHARSET=utf8;' . "\xd\xa" . 'CREATE TABLE IF NOT EXISTS `ims_tiny_wmall_store` (' . "\xa" . '  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,' . "\xa" . '  `uniacid` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `cid` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `title` varchar(30) NOT NULL,' . "\xa" . '  `logo` varchar(100) NOT NULL,' . "\xa" . '  `telephone` varchar(15) NOT NULL,' . "\xa" . '  `business_hours` varchar(200) NOT NULL,' . "\xa" . '  `description` text NOT NULL,' . "\xa" . '  `send_price` smallint(5) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `delivery_price` smallint(5) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `delivery_free_price` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `pack_price` float(10,2) unsigned NOT NULL DEFAULT \'0.00\',' . "\xa" . '  `delivery_time` tinyint(3) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `delivery_type` tinyint(3) unsigned NOT NULL DEFAULT \'1\' COMMENT \'1:商家配送,2:到店自提,3:两种都支持\',' . "\xa" . '  `delivery_type_` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `delivery_within_days` tinyint(3) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `delivery_reserve_days` tinyint(3) unsigned DEFAULT \'0\',' . "\xa" . '  `serve_radius` tinyint(3) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `delivery_area` varchar(50) NOT NULL,' . "\xa" . '  `thumbs` varchar(1000) NOT NULL,' . "\xa" . '  `address` varchar(50) NOT NULL,' . "\xa" . '  `location_x` varchar(15) NOT NULL,' . "\xa" . '  `location_y` varchar(15) NOT NULL,' . "\xa" . '  `status` tinyint(3) unsigned NOT NULL DEFAULT \'1\',' . "\xa" . '  `displayorder` tinyint(3) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `mobile_verify` varchar(255) NOT NULL,' . "\xa" . '  `sns` varchar(255) NOT NULL,' . "\xa" . '  `notice` varchar(100) NOT NULL COMMENT \'公告\',' . "\xa" . '  `content` varchar(255) NOT NULL,' . "\xa" . '  `payment` varchar(255) NOT NULL,' . "\xa" . '  `invoice_status` tinyint(3) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `token_status` tinyint(3) unsigned DEFAULT \'0\',' . "\xa" . '  `pay_time_limit` tinyint(3) unsigned NOT NULL DEFAULT \'15\',' . "\xa" . '  `remind_time_limit` tinyint(3) unsigned NOT NULL DEFAULT \'10\',' . "\xa" . '  `remind_reply` varchar(1500) NOT NULL,' . "\xa" . '  `comment_reply` varchar(2000) NOT NULL,' . "\xa" . '  `sailed` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `score` varchar(10) NOT NULL,' . "\xa" . '  `first_order_status` tinyint(3) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `discount_status` tinyint(3) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `grant_status` tinyint(3) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `bargain_price_status` tinyint(3) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `reserve_status` tinyint(3) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `collect_coupon_status` tinyint(3) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `grant_coupon_status` tinyint(3) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `amount_status` tinyint(3) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `comment_status` tinyint(3) unsigned NOT NULL DEFAULT \'1\' COMMENT \'评论审核.1:直接通过\',' . "\xa" . '  `sms_use_times` int(10) unsigned NOT NULL DEFAULT \'0\' COMMENT \'短信使用条数\',' . "\xa" . '  `wechat_qrcode` varchar(500) NOT NULL,' . "\xa" . '  `custom_url` varchar(500) NOT NULL,' . "\xa" . '  `addtype` tinyint(3) unsigned NOT NULL DEFAULT \'1\' COMMENT \'1:后台添加,2:申请入驻\',' . "\xa" . '  `addtime` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `template` varchar(20) NOT NULL DEFAULT \'index\',' . "\xa" . '  `pc_notice_status` tinyint(3) unsigned NOT NULL DEFAULT \'1\',' . "\xa" . '  `not_in_serve_radius` tinyint(3) unsigned NOT NULL DEFAULT \'1\',' . "\xa" . '  `auto_handel_order` tinyint(3) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `auto_get_address` tinyint(3) unsigned NOT NULL DEFAULT \'1\',' . "\xa" . '  `auto_notice_deliveryer` tinyint(3) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `auto_end_hours` tinyint(3) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `click` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `is_recommend` tinyint(3) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `is_assign` tinyint(3) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `is_reserve` tinyint(3) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `is_meal` tinyint(3) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `forward_mode` varchar(15) NOT NULL,' . "\xa" . '  `assign_mode` tinyint(3) unsigned NOT NULL DEFAULT \'1\',' . "\xa" . '  `assign_qrcode` varchar(255) NOT NULL,' . "\xa" . '  `delivery_mode` tinyint(3) unsigned NOT NULL DEFAULT \'1\',' . "\xa" . '  PRIMARY KEY (`id`),' . "\xa" . '  KEY `uniacid` (`uniacid`),' . "\xa" . '  KEY `title` (`title`)' . "\xa" . ') ENGINE=MyISAM AUTO_INCREMENT=11 DEFAULT CHARSET=utf8;' . "\xd\xa" . 'CREATE TABLE IF NOT EXISTS `ims_tiny_wmall_store_account` (' . "\xa" . '  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,' . "\xa" . '  `uniacid` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `sid` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `amount` decimal(10,2) NOT NULL DEFAULT \'0.00\',' . "\xa" . '  `fee_limit` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `fee_rate` varchar(10) NOT NULL DEFAULT \'0\',' . "\xa" . '  `fee_min` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `fee_max` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `wechat` varchar(1000) NOT NULL,' . "\xa" . '  `alipay` varchar(500) NOT NULL,' . "\xa" . '  `delivery_type` tinyint(3) unsigned NOT NULL DEFAULT \'1\',' . "\xa" . '  `delivery_price` varchar(10) NOT NULL,' . "\xa" . '  PRIMARY KEY (`id`),' . "\xa" . '  KEY `uniacid` (`uniacid`),' . "\xa" . '  KEY `sid` (`sid`)' . "\xa" . ') ENGINE=MyISAM AUTO_INCREMENT=13 DEFAULT CHARSET=utf8;' . "\xd\xa" . 'CREATE TABLE IF NOT EXISTS `ims_tiny_wmall_store_activity` (' . "\xa" . '  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,' . "\xa" . '  `uniacid` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `sid` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `first_order_status` tinyint(3) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `first_order_data` varchar(1500) NOT NULL,' . "\xa" . '  `discount_status` tinyint(3) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `discount_data` varchar(1500) NOT NULL,' . "\xa" . '  `grant_status` tinyint(3) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `grant_data` varchar(500) NOT NULL,' . "\xa" . '  `collect_coupon_status` tinyint(3) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `grant_coupon_status` tinyint(3) NOT NULL DEFAULT \'0\',' . "\xa" . '  `amount_status` tinyint(3) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `amount_data` varchar(1000) NOT NULL,' . "\xa" . '  PRIMARY KEY (`id`)' . "\xa" . ') ENGINE=MyISAM AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;' . "\xd\xa" . 'CREATE TABLE IF NOT EXISTS `ims_tiny_wmall_store_category` (' . "\xa" . '  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,' . "\xa" . '  `uniacid` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `title` varchar(20) NOT NULL,' . "\xa" . '  `thumb` varchar(255) NOT NULL,' . "\xa" . '  `displayorder` tinyint(3) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  PRIMARY KEY (`id`),' . "\xa" . '  KEY `uniacid` (`uniacid`)' . "\xa" . ') ENGINE=MyISAM AUTO_INCREMENT=9 DEFAULT CHARSET=utf8;' . "\xd\xa" . 'CREATE TABLE IF NOT EXISTS `ims_tiny_wmall_store_current_log` (' . "\xa" . '  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,' . "\xa" . '  `uniacid` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `sid` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `trade_type` tinyint(3) unsigned NOT NULL DEFAULT \'1\' COMMENT \'1:订单入账, 2: 申请提现\',' . "\xa" . '  `extra` varchar(255) NOT NULL,' . "\xa" . '  `fee` decimal(10,2) NOT NULL DEFAULT \'0.00\',' . "\xa" . '  `amount` decimal(10,2) NOT NULL DEFAULT \'0.00\',' . "\xa" . '  `addtime` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `remark` varchar(255) NOT NULL,' . "\xa" . '  PRIMARY KEY (`id`),' . "\xa" . '  KEY `sid` (`sid`),' . "\xa" . '  KEY `uniacid` (`uniacid`)' . "\xa" . ') ENGINE=MyISAM AUTO_INCREMENT=99 DEFAULT CHARSET=utf8;' . "\xd\xa" . 'CREATE TABLE IF NOT EXISTS `ims_tiny_wmall_store_delivery_times` (' . "\xa" . '  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,' . "\xa" . '  `uniacid` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `sid` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `start` varchar(20) NOT NULL,' . "\xa" . '  `end` varchar(20) NOT NULL,' . "\xa" . '  PRIMARY KEY (`id`),' . "\xa" . '  KEY `uniacid` (`uniacid`),' . "\xa" . '  KEY `sid` (`sid`)' . "\xa" . ') ENGINE=MyISAM AUTO_INCREMENT=20 DEFAULT CHARSET=utf8;' . "\xd\xa" . 'CREATE TABLE IF NOT EXISTS `ims_tiny_wmall_store_deliveryer` (' . "\xa" . '  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,' . "\xa" . '  `uniacid` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `sid` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `deliveryer_id` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `delivery_type` tinyint(3) unsigned NOT NULL DEFAULT \'2\',' . "\xa" . '  `addtime` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  PRIMARY KEY (`id`),' . "\xa" . '  KEY `uniacid` (`uniacid`),' . "\xa" . '  KEY `sid` (`sid`)' . "\xa" . ') ENGINE=MyISAM AUTO_INCREMENT=16 DEFAULT CHARSET=utf8;' . "\xd\xa" . 'CREATE TABLE IF NOT EXISTS `ims_tiny_wmall_store_favorite` (' . "\xa" . '  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,' . "\xa" . '  `uniacid` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `uid` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `sid` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `addtime` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  PRIMARY KEY (`id`),' . "\xa" . '  KEY `uniacid` (`uniacid`),' . "\xa" . '  KEY `uid_sid` (`uid`,`sid`)' . "\xa" . ') ENGINE=MyISAM AUTO_INCREMENT=13 DEFAULT CHARSET=utf8;' . "\xd\xa" . 'CREATE TABLE IF NOT EXISTS `ims_tiny_wmall_store_getcash_log` (' . "\xa" . '  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,' . "\xa" . '  `uniacid` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `sid` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `trade_no` varchar(20) NOT NULL,' . "\xa" . '  `get_fee` decimal(10,2) unsigned NOT NULL DEFAULT \'0.00\',' . "\xa" . '  `take_fee` decimal(10,2) unsigned NOT NULL DEFAULT \'0.00\',' . "\xa" . '  `final_fee` decimal(10,2) unsigned NOT NULL DEFAULT \'0.00\',' . "\xa" . '  `account_type` varchar(20) NOT NULL,' . "\xa" . '  `account` varchar(500) NOT NULL,' . "\xa" . '  `status` tinyint(3) unsigned NOT NULL DEFAULT \'2\' COMMENT \'1:申请成功,2:申请中\',' . "\xa" . '  `addtime` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `endtime` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  PRIMARY KEY (`id`),' . "\xa" . '  KEY `uniacid` (`uniacid`),' . "\xa" . '  KEY `sid` (`sid`)' . "\xa" . ') ENGINE=MyISAM DEFAULT CHARSET=utf8;' . "\xd\xa" . 'CREATE TABLE IF NOT EXISTS `ims_tiny_wmall_store_members` (' . "\xa" . '  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,' . "\xa" . '  `uniacid` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `sid` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `uid` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `openid` varchar(50) NOT NULL,' . "\xa" . '  `first_order_time` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `last_order_time` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `success_num` int(10) unsigned DEFAULT \'0\',' . "\xa" . '  `success_price` varchar(20) NOT NULL DEFAULT \'0.00\',' . "\xa" . '  `cancel_num` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `cancel_price` varchar(20) NOT NULL DEFAULT \'0.00\',' . "\xa" . '  `is_sys` tinyint(3) unsigned NOT NULL DEFAULT \'1\' COMMENT \'1:系统会员, 2:模块兼容会员\',' . "\xa" . '  PRIMARY KEY (`id`),' . "\xa" . '  KEY `first_order_time` (`first_order_time`),' . "\xa" . '  KEY `last_order_time` (`last_order_time`),' . "\xa" . '  KEY `sid` (`sid`),' . "\xa" . '  KEY `uniacid` (`uniacid`)' . "\xa" . ') ENGINE=MyISAM AUTO_INCREMENT=111 DEFAULT CHARSET=utf8;' . "\xd\xa" . 'CREATE TABLE IF NOT EXISTS `ims_tiny_wmall_store_settle_config` (' . "\xa" . '  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,' . "\xa" . '  `uniacid` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `status` tinyint(3) unsigned NOT NULL DEFAULT \'1\',' . "\xa" . '  `audit_status` tinyint(3) unsigned NOT NULL DEFAULT \'2\',' . "\xa" . '  `mobile_verify_status` tinyint(3) unsigned NOT NULL DEFAULT \'2\',' . "\xa" . '  `get_cash_fee_limit` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `get_cash_fee_rate` varchar(10) NOT NULL,' . "\xa" . '  `get_cash_fee_min` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `get_cash_fee_max` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `agreement` text,' . "\xa" . '  PRIMARY KEY (`id`),' . "\xa" . '  KEY `uniacid` (`uniacid`)' . "\xa" . ') ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;' . "\xd\xa" . 'CREATE TABLE IF NOT EXISTS `ims_tiny_wmall_tables` (' . "\xa" . '  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,' . "\xa" . '  `uniacid` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `sid` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `title` varchar(20) NOT NULL,' . "\xa" . '  `cid` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `order_id` int(10) unsigned NOT NULL DEFAULT \'0\' COMMENT \'当前对应的订单id\',' . "\xa" . '  `guest_num` tinyint(3) unsigned DEFAULT \'0\',' . "\xa" . '  `scan_num` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `qrcode` varchar(500) NOT NULL,' . "\xa" . '  `displayorder` tinyint(3) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `status` tinyint(3) unsigned NOT NULL DEFAULT \'1\',' . "\xa" . '  `createtime` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  PRIMARY KEY (`id`),' . "\xa" . '  KEY `uniacid_sid` (`uniacid`,`sid`)' . "\xa" . ') ENGINE=MyISAM DEFAULT CHARSET=utf8;' . "\xd\xa" . 'CREATE TABLE IF NOT EXISTS `ims_tiny_wmall_tables_category` (' . "\xa" . '  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,' . "\xa" . '  `uniacid` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `sid` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `title` varchar(20) NOT NULL,' . "\xa" . '  `limit_price` varchar(20) NOT NULL,' . "\xa" . '  `reservation_price` varchar(20) NOT NULL,' . "\xa" . '  PRIMARY KEY (`id`),' . "\xa" . '  KEY `uniacid` (`uniacid`),' . "\xa" . '  KEY `sid` (`sid`)' . "\xa" . ') ENGINE=MyISAM DEFAULT CHARSET=utf8;' . "\xd\xa" . 'CREATE TABLE IF NOT EXISTS `ims_tiny_wmall_tables_scan` (' . "\xa" . '  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,' . "\xa" . '  `uniacid` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `sid` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `table_id` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  `openid` varchar(50) NOT NULL,' . "\xa" . '  `nickname` varchar(50) NOT NULL,' . "\xa" . '  `avatar` varchar(255) NOT NULL,' . "\xa" . '  `createtime` int(10) unsigned NOT NULL DEFAULT \'0\',' . "\xa" . '  PRIMARY KEY (`id`),' . "\xa" . '  KEY `uniacid` (`uniacid`),' . "\xa" . '  KEY `sid` (`sid`),' . "\xa" . '  KEY `table_id` (`table_id`)' . "\xa" . ') ENGINE=MyISAM DEFAULT CHARSET=utf8;' . "\xd\xa" . '');if(pdo_tableexists('tiny_wmall_account')){if(!pdo_fieldexists('tiny_wmall_account', 'id')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_account').' ADD `id` int(10) unsigned NOT NULL auto_increment  COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_account')){if(!pdo_fieldexists('tiny_wmall_account', 'uniacid')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_account').' ADD `uniacid` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_account')){if(!pdo_fieldexists('tiny_wmall_account', 'acid')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_account').' ADD `acid` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_account')){if(!pdo_fieldexists('tiny_wmall_account', 'uid')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_account').' ADD `uid` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_account')){if(!pdo_fieldexists('tiny_wmall_account', 'openid')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_account').' ADD `openid` varchar(50) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_account')){if(!pdo_fieldexists('tiny_wmall_account', 'username')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_account').' ADD `username` varchar(50) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_account')){if(!pdo_fieldexists('tiny_wmall_account', 'password')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_account').' ADD `password` varchar(32) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_account')){if(!pdo_fieldexists('tiny_wmall_account', 'salt')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_account').' ADD `salt` varchar(6) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_account')){if(!pdo_fieldexists('tiny_wmall_account', 'mobile')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_account').' ADD `mobile` varchar(20) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_account')){if(!pdo_fieldexists('tiny_wmall_account', 'status')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_account').' ADD `status` tinyint(3) NOT NULL  DEFAULT 2 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_account')){if(!pdo_fieldexists('tiny_wmall_account', 'store_id')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_account').' ADD `store_id` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_account')){if(!pdo_fieldexists('tiny_wmall_account', 'joindate')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_account').' ADD `joindate` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_account')){if(!pdo_fieldexists('tiny_wmall_account', 'joinip')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_account').' ADD `joinip` varchar(15) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_account')){if(!pdo_fieldexists('tiny_wmall_account', 'lastvisit')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_account').' ADD `lastvisit` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_account')){if(!pdo_fieldexists('tiny_wmall_account', 'lastip')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_account').' ADD `lastip` varchar(15) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_account')){if(!pdo_fieldexists('tiny_wmall_account', 'remark')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_account').' ADD `remark` varchar(500) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_activity_coupon')){if(!pdo_fieldexists('tiny_wmall_activity_coupon', 'id')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_activity_coupon').' ADD `id` int(10) unsigned NOT NULL auto_increment  COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_activity_coupon')){if(!pdo_fieldexists('tiny_wmall_activity_coupon', 'uniacid')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_activity_coupon').' ADD `uniacid` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'公号序号\';');}}if(pdo_tableexists('tiny_wmall_activity_coupon')){if(!pdo_fieldexists('tiny_wmall_activity_coupon', 'sid')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_activity_coupon').' ADD `sid` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'公号序号\';');}}if(pdo_tableexists('tiny_wmall_activity_coupon')){if(!pdo_fieldexists('tiny_wmall_activity_coupon', 'type')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_activity_coupon').' ADD `type` tinyint(4) NOT NULL   COMMENT \'优惠券类型. 1为折扣券, 2为代金券\';');}}if(pdo_tableexists('tiny_wmall_activity_coupon')){if(!pdo_fieldexists('tiny_wmall_activity_coupon', 'title')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_activity_coupon').' ADD `title` varchar(30) NOT NULL   COMMENT \'标题\';');}}if(pdo_tableexists('tiny_wmall_activity_coupon')){if(!pdo_fieldexists('tiny_wmall_activity_coupon', 'discount')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_activity_coupon').' ADD `discount` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'折扣券(折扣率), 代金券(面额)\';');}}if(pdo_tableexists('tiny_wmall_activity_coupon')){if(!pdo_fieldexists('tiny_wmall_activity_coupon', 'condition')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_activity_coupon').' ADD `condition` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'订单满多少可用\';');}}if(pdo_tableexists('tiny_wmall_activity_coupon')){if(!pdo_fieldexists('tiny_wmall_activity_coupon', 'get_limit')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_activity_coupon').' ADD `get_limit` int(10) NOT NULL  DEFAULT 1 COMMENT \'每人限领\';');}}if(pdo_tableexists('tiny_wmall_activity_coupon')){if(!pdo_fieldexists('tiny_wmall_activity_coupon', 'type_limit')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_activity_coupon').' ADD `type_limit` int(10) NOT NULL  DEFAULT 1 COMMENT \'1:所有用户都可领取,2:新用户可领取\';');}}if(pdo_tableexists('tiny_wmall_activity_coupon')){if(!pdo_fieldexists('tiny_wmall_activity_coupon', 'use_limit')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_activity_coupon').' ADD `use_limit` tinyint(3) unsigned NOT NULL  DEFAULT 1 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_activity_coupon')){if(!pdo_fieldexists('tiny_wmall_activity_coupon', 'grant_type')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_activity_coupon').' ADD `grant_type` tinyint(3) unsigned NOT NULL  DEFAULT 1 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_activity_coupon')){if(!pdo_fieldexists('tiny_wmall_activity_coupon', 'dosage')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_activity_coupon').' ADD `dosage` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'已领取数量\';');}}if(pdo_tableexists('tiny_wmall_activity_coupon')){if(!pdo_fieldexists('tiny_wmall_activity_coupon', 'amount')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_activity_coupon').' ADD `amount` int(10) unsigned NOT NULL   COMMENT \'总发行数量\';');}}if(pdo_tableexists('tiny_wmall_activity_coupon')){if(!pdo_fieldexists('tiny_wmall_activity_coupon', 'status')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_activity_coupon').' ADD `status` tinyint(3) unsigned NOT NULL  DEFAULT 1 COMMENT \'1:可领取,2:暂停领取\';');}}if(pdo_tableexists('tiny_wmall_activity_coupon')){if(!pdo_fieldexists('tiny_wmall_activity_coupon', 'starttime')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_activity_coupon').' ADD `starttime` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'开始时间\';');}}if(pdo_tableexists('tiny_wmall_activity_coupon')){if(!pdo_fieldexists('tiny_wmall_activity_coupon', 'endtime')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_activity_coupon').' ADD `endtime` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'结束时间\';');}}if(pdo_tableexists('tiny_wmall_activity_coupon')){if(!pdo_fieldexists('tiny_wmall_activity_coupon', 'addtime')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_activity_coupon').' ADD `addtime` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'发行时间\';');}}if(pdo_tableexists('tiny_wmall_activity_coupon_grant_log')){if(!pdo_fieldexists('tiny_wmall_activity_coupon_grant_log', 'id')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_activity_coupon_grant_log').' ADD `id` int(10) unsigned NOT NULL auto_increment  COMMENT \'序号\';');}}if(pdo_tableexists('tiny_wmall_activity_coupon_grant_log')){if(!pdo_fieldexists('tiny_wmall_activity_coupon_grant_log', 'uniacid')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_activity_coupon_grant_log').' ADD `uniacid` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_activity_coupon_grant_log')){if(!pdo_fieldexists('tiny_wmall_activity_coupon_grant_log', 'sid')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_activity_coupon_grant_log').' ADD `sid` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_activity_coupon_grant_log')){if(!pdo_fieldexists('tiny_wmall_activity_coupon_grant_log', 'couponid')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_activity_coupon_grant_log').' ADD `couponid` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_activity_coupon_grant_log')){if(!pdo_fieldexists('tiny_wmall_activity_coupon_grant_log', 'uid')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_activity_coupon_grant_log').' ADD `uid` int(10) unsigned NOT NULL   COMMENT \'用户编号\';');}}if(pdo_tableexists('tiny_wmall_activity_coupon_grant_log')){if(!pdo_fieldexists('tiny_wmall_activity_coupon_grant_log', 'grant_type')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_activity_coupon_grant_log').' ADD `grant_type` tinyint(3) NOT NULL  DEFAULT 1 COMMENT \'状态: 1:一次性领取,2:每天领取 \';');}}if(pdo_tableexists('tiny_wmall_activity_coupon_grant_log')){if(!pdo_fieldexists('tiny_wmall_activity_coupon_grant_log', 'addtime')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_activity_coupon_grant_log').' ADD `addtime` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_activity_coupon_record')){if(!pdo_fieldexists('tiny_wmall_activity_coupon_record', 'id')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_activity_coupon_record').' ADD `id` int(10) unsigned NOT NULL auto_increment  COMMENT \'序号\';');}}if(pdo_tableexists('tiny_wmall_activity_coupon_record')){if(!pdo_fieldexists('tiny_wmall_activity_coupon_record', 'uniacid')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_activity_coupon_record').' ADD `uniacid` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_activity_coupon_record')){if(!pdo_fieldexists('tiny_wmall_activity_coupon_record', 'sid')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_activity_coupon_record').' ADD `sid` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_activity_coupon_record')){if(!pdo_fieldexists('tiny_wmall_activity_coupon_record', 'couponid')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_activity_coupon_record').' ADD `couponid` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_activity_coupon_record')){if(!pdo_fieldexists('tiny_wmall_activity_coupon_record', 'uid')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_activity_coupon_record').' ADD `uid` int(10) unsigned NOT NULL   COMMENT \'用户编号\';');}}if(pdo_tableexists('tiny_wmall_activity_coupon_record')){if(!pdo_fieldexists('tiny_wmall_activity_coupon_record', 'order_id')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_activity_coupon_record').' ADD `order_id` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_activity_coupon_record')){if(!pdo_fieldexists('tiny_wmall_activity_coupon_record', 'code')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_activity_coupon_record').' ADD `code` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_activity_coupon_record')){if(!pdo_fieldexists('tiny_wmall_activity_coupon_record', 'status')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_activity_coupon_record').' ADD `status` tinyint(3) NOT NULL  DEFAULT 1 COMMENT \'状态: 1:未使用,2:已使用 \';');}}if(pdo_tableexists('tiny_wmall_activity_coupon_record')){if(!pdo_fieldexists('tiny_wmall_activity_coupon_record', 'remark')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_activity_coupon_record').' ADD `remark` varchar(300) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_activity_coupon_record')){if(!pdo_fieldexists('tiny_wmall_activity_coupon_record', 'granttime')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_activity_coupon_record').' ADD `granttime` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'发放时间\';');}}if(pdo_tableexists('tiny_wmall_activity_coupon_record')){if(!pdo_fieldexists('tiny_wmall_activity_coupon_record', 'usetime')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_activity_coupon_record').' ADD `usetime` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'使用时间\';');}}if(pdo_tableexists('tiny_wmall_address')){if(!pdo_fieldexists('tiny_wmall_address', 'id')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_address').' ADD `id` int(10) unsigned NOT NULL auto_increment  COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_address')){if(!pdo_fieldexists('tiny_wmall_address', 'uniacid')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_address').' ADD `uniacid` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_address')){if(!pdo_fieldexists('tiny_wmall_address', 'uid')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_address').' ADD `uid` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_address')){if(!pdo_fieldexists('tiny_wmall_address', 'realname')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_address').' ADD `realname` varchar(15) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_address')){if(!pdo_fieldexists('tiny_wmall_address', 'sex')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_address').' ADD `sex` varchar(10) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_address')){if(!pdo_fieldexists('tiny_wmall_address', 'mobile')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_address').' ADD `mobile` varchar(15) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_address')){if(!pdo_fieldexists('tiny_wmall_address', 'address')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_address').' ADD `address` varchar(50) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_address')){if(!pdo_fieldexists('tiny_wmall_address', 'number')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_address').' ADD `number` varchar(20) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_address')){if(!pdo_fieldexists('tiny_wmall_address', 'location_x')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_address').' ADD `location_x` varchar(20) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_address')){if(!pdo_fieldexists('tiny_wmall_address', 'location_y')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_address').' ADD `location_y` varchar(20) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_address')){if(!pdo_fieldexists('tiny_wmall_address', 'is_default')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_address').' ADD `is_default` tinyint(3) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_article')){if(!pdo_fieldexists('tiny_wmall_article', 'id')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_article').' ADD `id` int(10) unsigned NOT NULL auto_increment  COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_article')){if(!pdo_fieldexists('tiny_wmall_article', 'uniacid')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_article').' ADD `uniacid` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_article')){if(!pdo_fieldexists('tiny_wmall_article', 'cateid')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_article').' ADD `cateid` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_article')){if(!pdo_fieldexists('tiny_wmall_article', 'title')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_article').' ADD `title` varchar(100) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_article')){if(!pdo_fieldexists('tiny_wmall_article', 'thumb')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_article').' ADD `thumb` varchar(255) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_article')){if(!pdo_fieldexists('tiny_wmall_article', 'content')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_article').' ADD `content` mediumtext NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_article')){if(!pdo_fieldexists('tiny_wmall_article', 'displayorder')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_article').' ADD `displayorder` tinyint(3) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_article')){if(!pdo_fieldexists('tiny_wmall_article', 'status')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_article').' ADD `status` tinyint(3) unsigned NOT NULL  DEFAULT 1 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_article')){if(!pdo_fieldexists('tiny_wmall_article', 'createtime')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_article').' ADD `createtime` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_article')){if(!pdo_fieldexists('tiny_wmall_article', 'click')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_article').' ADD `click` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_article_category')){if(!pdo_fieldexists('tiny_wmall_article_category', 'id')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_article_category').' ADD `id` int(10) unsigned NOT NULL auto_increment  COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_article_category')){if(!pdo_fieldexists('tiny_wmall_article_category', 'uniacid')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_article_category').' ADD `uniacid` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_article_category')){if(!pdo_fieldexists('tiny_wmall_article_category', 'title')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_article_category').' ADD `title` varchar(30) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_article_category')){if(!pdo_fieldexists('tiny_wmall_article_category', 'status')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_article_category').' ADD `status` tinyint(3) unsigned NOT NULL  DEFAULT 1 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_article_category')){if(!pdo_fieldexists('tiny_wmall_article_category', 'displayorder')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_article_category').' ADD `displayorder` tinyint(3) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_assign_board')){if(!pdo_fieldexists('tiny_wmall_assign_board', 'id')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_assign_board').' ADD `id` int(10) unsigned NOT NULL auto_increment  COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_assign_board')){if(!pdo_fieldexists('tiny_wmall_assign_board', 'uniacid')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_assign_board').' ADD `uniacid` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_assign_board')){if(!pdo_fieldexists('tiny_wmall_assign_board', 'sid')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_assign_board').' ADD `sid` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_assign_board')){if(!pdo_fieldexists('tiny_wmall_assign_board', 'queue_id')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_assign_board').' ADD `queue_id` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_assign_board')){if(!pdo_fieldexists('tiny_wmall_assign_board', 'uid')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_assign_board').' ADD `uid` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_assign_board')){if(!pdo_fieldexists('tiny_wmall_assign_board', 'mobile')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_assign_board').' ADD `mobile` varchar(15) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_assign_board')){if(!pdo_fieldexists('tiny_wmall_assign_board', 'openid')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_assign_board').' ADD `openid` varchar(64) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_assign_board')){if(!pdo_fieldexists('tiny_wmall_assign_board', 'guest_num')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_assign_board').' ADD `guest_num` tinyint(3) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_assign_board')){if(!pdo_fieldexists('tiny_wmall_assign_board', 'number')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_assign_board').' ADD `number` varchar(20) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_assign_board')){if(!pdo_fieldexists('tiny_wmall_assign_board', 'position')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_assign_board').' ADD `position` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_assign_board')){if(!pdo_fieldexists('tiny_wmall_assign_board', 'status')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_assign_board').' ADD `status` tinyint(3) unsigned NOT NULL  DEFAULT 1 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_assign_board')){if(!pdo_fieldexists('tiny_wmall_assign_board', 'is_notify')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_assign_board').' ADD `is_notify` tinyint(3) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_assign_board')){if(!pdo_fieldexists('tiny_wmall_assign_board', 'createtime')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_assign_board').' ADD `createtime` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_assign_queue')){if(!pdo_fieldexists('tiny_wmall_assign_queue', 'id')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_assign_queue').' ADD `id` int(10) unsigned NOT NULL auto_increment  COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_assign_queue')){if(!pdo_fieldexists('tiny_wmall_assign_queue', 'uniacid')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_assign_queue').' ADD `uniacid` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_assign_queue')){if(!pdo_fieldexists('tiny_wmall_assign_queue', 'sid')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_assign_queue').' ADD `sid` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_assign_queue')){if(!pdo_fieldexists('tiny_wmall_assign_queue', 'title')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_assign_queue').' ADD `title` varchar(20) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_assign_queue')){if(!pdo_fieldexists('tiny_wmall_assign_queue', 'guest_num')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_assign_queue').' ADD `guest_num` tinyint(3) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_assign_queue')){if(!pdo_fieldexists('tiny_wmall_assign_queue', 'notify_num')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_assign_queue').' ADD `notify_num` tinyint(3) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_assign_queue')){if(!pdo_fieldexists('tiny_wmall_assign_queue', 'starttime')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_assign_queue').' ADD `starttime` varchar(10) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_assign_queue')){if(!pdo_fieldexists('tiny_wmall_assign_queue', 'endtime')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_assign_queue').' ADD `endtime` varchar(10) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_assign_queue')){if(!pdo_fieldexists('tiny_wmall_assign_queue', 'prefix')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_assign_queue').' ADD `prefix` varchar(10) NOT NULL   COMMENT \'前缀\';');}}if(pdo_tableexists('tiny_wmall_assign_queue')){if(!pdo_fieldexists('tiny_wmall_assign_queue', 'status')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_assign_queue').' ADD `status` tinyint(3) unsigned NOT NULL  DEFAULT 1 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_assign_queue')){if(!pdo_fieldexists('tiny_wmall_assign_queue', 'position')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_assign_queue').' ADD `position` int(10) unsigned NOT NULL  DEFAULT 1 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_assign_queue')){if(!pdo_fieldexists('tiny_wmall_assign_queue', 'updatetime')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_assign_queue').' ADD `updatetime` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'根据这个时间,判断是否将position重新至0\';');}}if(pdo_tableexists('tiny_wmall_black')){if(!pdo_fieldexists('tiny_wmall_black', 'id')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_black').' ADD `id` int(10) unsigned NOT NULL auto_increment  COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_black')){if(!pdo_fieldexists('tiny_wmall_black', 'from')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_black').' ADD `from` varchar(255) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_black')){if(!pdo_fieldexists('tiny_wmall_black', 'to')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_black').' ADD `to` varchar(255) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_black')){if(!pdo_fieldexists('tiny_wmall_black', 'type')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_black').' ADD `type` tinyint(3) unsigned NOT NULL  DEFAULT 1 COMMENT \'1传播,2:盗版\';');}}if(pdo_tableexists('tiny_wmall_black')){if(!pdo_fieldexists('tiny_wmall_black', 'addtime')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_black').' ADD `addtime` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_black')){if(!pdo_fieldexists('tiny_wmall_black', 'addtime_cn')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_black').' ADD `addtime_cn` varchar(30) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_clerk')){if(!pdo_fieldexists('tiny_wmall_clerk', 'id')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_clerk').' ADD `id` int(10) unsigned NOT NULL auto_increment  COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_clerk')){if(!pdo_fieldexists('tiny_wmall_clerk', 'uniacid')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_clerk').' ADD `uniacid` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_clerk')){if(!pdo_fieldexists('tiny_wmall_clerk', 'sid')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_clerk').' ADD `sid` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_clerk')){if(!pdo_fieldexists('tiny_wmall_clerk', 'role')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_clerk').' ADD `role` varchar(15) NOT NULL  DEFAULT clerk COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_clerk')){if(!pdo_fieldexists('tiny_wmall_clerk', 'title')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_clerk').' ADD `title` varchar(15) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_clerk')){if(!pdo_fieldexists('tiny_wmall_clerk', 'nickname')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_clerk').' ADD `nickname` varchar(15) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_clerk')){if(!pdo_fieldexists('tiny_wmall_clerk', 'openid')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_clerk').' ADD `openid` varchar(60) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_clerk')){if(!pdo_fieldexists('tiny_wmall_clerk', 'mobile')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_clerk').' ADD `mobile` varchar(20) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_clerk')){if(!pdo_fieldexists('tiny_wmall_clerk', 'password')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_clerk').' ADD `password` varchar(32) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_clerk')){if(!pdo_fieldexists('tiny_wmall_clerk', 'salt')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_clerk').' ADD `salt` varchar(6) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_clerk')){if(!pdo_fieldexists('tiny_wmall_clerk', 'status')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_clerk').' ADD `status` tinyint(3) unsigned NOT NULL  DEFAULT 1 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_clerk')){if(!pdo_fieldexists('tiny_wmall_clerk', 'addtime')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_clerk').' ADD `addtime` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_config')){if(!pdo_fieldexists('tiny_wmall_config', 'id')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_config').' ADD `id` int(10) unsigned NOT NULL auto_increment  COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_config')){if(!pdo_fieldexists('tiny_wmall_config', 'uniacid')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_config').' ADD `uniacid` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_config')){if(!pdo_fieldexists('tiny_wmall_config', 'title')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_config').' ADD `title` varchar(25) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_config')){if(!pdo_fieldexists('tiny_wmall_config', 'mobile')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_config').' ADD `mobile` varchar(25) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_config')){if(!pdo_fieldexists('tiny_wmall_config', 'content')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_config').' ADD `content` varchar(255) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_config')){if(!pdo_fieldexists('tiny_wmall_config', 'thumb')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_config').' ADD `thumb` varchar(100) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_config')){if(!pdo_fieldexists('tiny_wmall_config', 'followurl')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_config').' ADD `followurl` varchar(100) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_config')){if(!pdo_fieldexists('tiny_wmall_config', 'public_tpl')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_config').' ADD `public_tpl` varchar(200) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_config')){if(!pdo_fieldexists('tiny_wmall_config', 'notice')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_config').' ADD `notice` varchar(1000) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_config')){if(!pdo_fieldexists('tiny_wmall_config', 'version')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_config').' ADD `version` tinyint(3) unsigned NOT NULL  DEFAULT 1 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_config')){if(!pdo_fieldexists('tiny_wmall_config', 'default_sid')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_config').' ADD `default_sid` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_config')){if(!pdo_fieldexists('tiny_wmall_config', 'sms')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_config').' ADD `sms` varchar(1000) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_config')){if(!pdo_fieldexists('tiny_wmall_config', 'imgnav_status')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_config').' ADD `imgnav_status` tinyint(3) unsigned NOT NULL  DEFAULT 1 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_config')){if(!pdo_fieldexists('tiny_wmall_config', 'imgnav_data')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_config').' ADD `imgnav_data` varchar(3000) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_config')){if(!pdo_fieldexists('tiny_wmall_config', 'copyright')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_config').' ADD `copyright` varchar(1500) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_config')){if(!pdo_fieldexists('tiny_wmall_config', 'payment')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_config').' ADD `payment` varchar(1000) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_config')){if(!pdo_fieldexists('tiny_wmall_config', 'manager')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_config').' ADD `manager` varchar(500) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_config')){if(!pdo_fieldexists('tiny_wmall_config', 'credit')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_config').' ADD `credit` varchar(255) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_config')){if(!pdo_fieldexists('tiny_wmall_config', 'report')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_config').' ADD `report` varchar(2000) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_delivery_cards')){if(!pdo_fieldexists('tiny_wmall_delivery_cards', 'id')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_delivery_cards').' ADD `id` int(10) unsigned NOT NULL auto_increment  COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_delivery_cards')){if(!pdo_fieldexists('tiny_wmall_delivery_cards', 'uniacid')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_delivery_cards').' ADD `uniacid` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_delivery_cards')){if(!pdo_fieldexists('tiny_wmall_delivery_cards', 'title')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_delivery_cards').' ADD `title` varchar(20) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_delivery_cards')){if(!pdo_fieldexists('tiny_wmall_delivery_cards', 'days')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_delivery_cards').' ADD `days` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_delivery_cards')){if(!pdo_fieldexists('tiny_wmall_delivery_cards', 'price')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_delivery_cards').' ADD `price` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_delivery_cards')){if(!pdo_fieldexists('tiny_wmall_delivery_cards', 'day_free_limit')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_delivery_cards').' ADD `day_free_limit` tinyint(3) unsigned NOT NULL  DEFAULT 2 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_delivery_cards')){if(!pdo_fieldexists('tiny_wmall_delivery_cards', 'displayorder')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_delivery_cards').' ADD `displayorder` tinyint(3) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_delivery_cards')){if(!pdo_fieldexists('tiny_wmall_delivery_cards', 'status')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_delivery_cards').' ADD `status` tinyint(3) unsigned NOT NULL  DEFAULT 1 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_delivery_cards_order')){if(!pdo_fieldexists('tiny_wmall_delivery_cards_order', 'id')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_delivery_cards_order').' ADD `id` int(10) unsigned NOT NULL auto_increment  COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_delivery_cards_order')){if(!pdo_fieldexists('tiny_wmall_delivery_cards_order', 'uniacid')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_delivery_cards_order').' ADD `uniacid` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_delivery_cards_order')){if(!pdo_fieldexists('tiny_wmall_delivery_cards_order', 'acid')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_delivery_cards_order').' ADD `acid` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_delivery_cards_order')){if(!pdo_fieldexists('tiny_wmall_delivery_cards_order', 'uid')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_delivery_cards_order').' ADD `uid` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_delivery_cards_order')){if(!pdo_fieldexists('tiny_wmall_delivery_cards_order', 'openid')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_delivery_cards_order').' ADD `openid` varchar(60) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_delivery_cards_order')){if(!pdo_fieldexists('tiny_wmall_delivery_cards_order', 'ordersn')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_delivery_cards_order').' ADD `ordersn` varchar(20) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_delivery_cards_order')){if(!pdo_fieldexists('tiny_wmall_delivery_cards_order', 'card_id')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_delivery_cards_order').' ADD `card_id` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_delivery_cards_order')){if(!pdo_fieldexists('tiny_wmall_delivery_cards_order', 'final_fee')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_delivery_cards_order').' ADD `final_fee` varchar(20) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_delivery_cards_order')){if(!pdo_fieldexists('tiny_wmall_delivery_cards_order', 'pay_type')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_delivery_cards_order').' ADD `pay_type` varchar(20) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_delivery_cards_order')){if(!pdo_fieldexists('tiny_wmall_delivery_cards_order', 'is_pay')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_delivery_cards_order').' ADD `is_pay` tinyint(3) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_delivery_cards_order')){if(!pdo_fieldexists('tiny_wmall_delivery_cards_order', 'addtime')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_delivery_cards_order').' ADD `addtime` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_delivery_cards_order')){if(!pdo_fieldexists('tiny_wmall_delivery_cards_order', 'paytime')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_delivery_cards_order').' ADD `paytime` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_delivery_cards_order')){if(!pdo_fieldexists('tiny_wmall_delivery_cards_order', 'starttime')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_delivery_cards_order').' ADD `starttime` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_delivery_cards_order')){if(!pdo_fieldexists('tiny_wmall_delivery_cards_order', 'endtime')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_delivery_cards_order').' ADD `endtime` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_delivery_config')){if(!pdo_fieldexists('tiny_wmall_delivery_config', 'id')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_delivery_config').' ADD `id` int(10) unsigned NOT NULL auto_increment  COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_delivery_config')){if(!pdo_fieldexists('tiny_wmall_delivery_config', 'uniacid')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_delivery_config').' ADD `uniacid` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_delivery_config')){if(!pdo_fieldexists('tiny_wmall_delivery_config', 'mobile_verify_status')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_delivery_config').' ADD `mobile_verify_status` tinyint(3) unsigned NOT NULL  DEFAULT 2 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_delivery_config')){if(!pdo_fieldexists('tiny_wmall_delivery_config', 'agreement')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_delivery_config').' ADD `agreement` text NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_delivery_config')){if(!pdo_fieldexists('tiny_wmall_delivery_config', 'delivery_type')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_delivery_config').' ADD `delivery_type` tinyint(3) unsigned NOT NULL  DEFAULT 1 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_delivery_config')){if(!pdo_fieldexists('tiny_wmall_delivery_config', 'plateform_delivery_fee')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_delivery_config').' ADD `plateform_delivery_fee` tinyint(3) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_delivery_config')){if(!pdo_fieldexists('tiny_wmall_delivery_config', 'delivery_fee_type')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_delivery_config').' ADD `delivery_fee_type` tinyint(3) unsigned NOT NULL  DEFAULT 1 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_delivery_config')){if(!pdo_fieldexists('tiny_wmall_delivery_config', 'delivery_fee')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_delivery_config').' ADD `delivery_fee` varchar(10) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_delivery_config')){if(!pdo_fieldexists('tiny_wmall_delivery_config', 'get_cash_fee_limit')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_delivery_config').' ADD `get_cash_fee_limit` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_delivery_config')){if(!pdo_fieldexists('tiny_wmall_delivery_config', 'get_cash_fee_rate')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_delivery_config').' ADD `get_cash_fee_rate` varchar(10) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_delivery_config')){if(!pdo_fieldexists('tiny_wmall_delivery_config', 'get_cash_fee_min')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_delivery_config').' ADD `get_cash_fee_min` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_delivery_config')){if(!pdo_fieldexists('tiny_wmall_delivery_config', 'get_cash_fee_max')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_delivery_config').' ADD `get_cash_fee_max` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_delivery_config')){if(!pdo_fieldexists('tiny_wmall_delivery_config', 'card_apply_status')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_delivery_config').' ADD `card_apply_status` tinyint(3) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_delivery_config')){if(!pdo_fieldexists('tiny_wmall_delivery_config', 'card_agreement')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_delivery_config').' ADD `card_agreement` text NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_deliveryer')){if(!pdo_fieldexists('tiny_wmall_deliveryer', 'id')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_deliveryer').' ADD `id` int(10) unsigned NOT NULL auto_increment  COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_deliveryer')){if(!pdo_fieldexists('tiny_wmall_deliveryer', 'uniacid')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_deliveryer').' ADD `uniacid` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_deliveryer')){if(!pdo_fieldexists('tiny_wmall_deliveryer', 'title')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_deliveryer').' ADD `title` varchar(15) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_deliveryer')){if(!pdo_fieldexists('tiny_wmall_deliveryer', 'nickname')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_deliveryer').' ADD `nickname` varchar(15) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_deliveryer')){if(!pdo_fieldexists('tiny_wmall_deliveryer', 'openid')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_deliveryer').' ADD `openid` varchar(60) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_deliveryer')){if(!pdo_fieldexists('tiny_wmall_deliveryer', 'avatar')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_deliveryer').' ADD `avatar` varchar(255) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_deliveryer')){if(!pdo_fieldexists('tiny_wmall_deliveryer', 'mobile')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_deliveryer').' ADD `mobile` varchar(15) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_deliveryer')){if(!pdo_fieldexists('tiny_wmall_deliveryer', 'password')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_deliveryer').' ADD `password` varchar(32) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_deliveryer')){if(!pdo_fieldexists('tiny_wmall_deliveryer', 'salt')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_deliveryer').' ADD `salt` varchar(6) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_deliveryer')){if(!pdo_fieldexists('tiny_wmall_deliveryer', 'sex')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_deliveryer').' ADD `sex` varchar(5) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_deliveryer')){if(!pdo_fieldexists('tiny_wmall_deliveryer', 'age')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_deliveryer').' ADD `age` tinyint(3) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_deliveryer')){if(!pdo_fieldexists('tiny_wmall_deliveryer', 'addtime')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_deliveryer').' ADD `addtime` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_deliveryer')){if(!pdo_fieldexists('tiny_wmall_deliveryer', 'credit1')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_deliveryer').' ADD `credit1` decimal(10,2) unsigned NOT NULL  DEFAULT 0.00 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_deliveryer')){if(!pdo_fieldexists('tiny_wmall_deliveryer', 'credit2')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_deliveryer').' ADD `credit2` decimal(10,2) unsigned NOT NULL  DEFAULT 0.00 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_deliveryer_current_log')){if(!pdo_fieldexists('tiny_wmall_deliveryer_current_log', 'id')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_deliveryer_current_log').' ADD `id` int(10) unsigned NOT NULL auto_increment  COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_deliveryer_current_log')){if(!pdo_fieldexists('tiny_wmall_deliveryer_current_log', 'uniacid')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_deliveryer_current_log').' ADD `uniacid` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_deliveryer_current_log')){if(!pdo_fieldexists('tiny_wmall_deliveryer_current_log', 'deliveryer_id')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_deliveryer_current_log').' ADD `deliveryer_id` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_deliveryer_current_log')){if(!pdo_fieldexists('tiny_wmall_deliveryer_current_log', 'trade_type')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_deliveryer_current_log').' ADD `trade_type` tinyint(3) unsigned NOT NULL  DEFAULT 1 COMMENT \'1:订单入账, 2: 申请提现\';');}}if(pdo_tableexists('tiny_wmall_deliveryer_current_log')){if(!pdo_fieldexists('tiny_wmall_deliveryer_current_log', 'extra')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_deliveryer_current_log').' ADD `extra` varchar(255) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_deliveryer_current_log')){if(!pdo_fieldexists('tiny_wmall_deliveryer_current_log', 'fee')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_deliveryer_current_log').' ADD `fee` decimal(10,2) NOT NULL  DEFAULT 0.00 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_deliveryer_current_log')){if(!pdo_fieldexists('tiny_wmall_deliveryer_current_log', 'amount')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_deliveryer_current_log').' ADD `amount` decimal(10,2) NOT NULL  DEFAULT 0.00 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_deliveryer_current_log')){if(!pdo_fieldexists('tiny_wmall_deliveryer_current_log', 'addtime')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_deliveryer_current_log').' ADD `addtime` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_deliveryer_current_log')){if(!pdo_fieldexists('tiny_wmall_deliveryer_current_log', 'remark')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_deliveryer_current_log').' ADD `remark` varchar(255) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_deliveryer_getcash_log')){if(!pdo_fieldexists('tiny_wmall_deliveryer_getcash_log', 'id')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_deliveryer_getcash_log').' ADD `id` int(10) unsigned NOT NULL auto_increment  COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_deliveryer_getcash_log')){if(!pdo_fieldexists('tiny_wmall_deliveryer_getcash_log', 'uniacid')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_deliveryer_getcash_log').' ADD `uniacid` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_deliveryer_getcash_log')){if(!pdo_fieldexists('tiny_wmall_deliveryer_getcash_log', 'deliveryer_id')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_deliveryer_getcash_log').' ADD `deliveryer_id` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_deliveryer_getcash_log')){if(!pdo_fieldexists('tiny_wmall_deliveryer_getcash_log', 'trade_no')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_deliveryer_getcash_log').' ADD `trade_no` varchar(20) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_deliveryer_getcash_log')){if(!pdo_fieldexists('tiny_wmall_deliveryer_getcash_log', 'get_fee')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_deliveryer_getcash_log').' ADD `get_fee` decimal(10,2) unsigned NOT NULL  DEFAULT 0.00 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_deliveryer_getcash_log')){if(!pdo_fieldexists('tiny_wmall_deliveryer_getcash_log', 'take_fee')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_deliveryer_getcash_log').' ADD `take_fee` decimal(10,2) unsigned NOT NULL  DEFAULT 0.00 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_deliveryer_getcash_log')){if(!pdo_fieldexists('tiny_wmall_deliveryer_getcash_log', 'final_fee')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_deliveryer_getcash_log').' ADD `final_fee` decimal(10,2) unsigned NOT NULL  DEFAULT 0.00 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_deliveryer_getcash_log')){if(!pdo_fieldexists('tiny_wmall_deliveryer_getcash_log', 'status')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_deliveryer_getcash_log').' ADD `status` tinyint(3) unsigned NOT NULL  DEFAULT 2 COMMENT \'1:申请成功,2:申请中\';');}}if(pdo_tableexists('tiny_wmall_deliveryer_getcash_log')){if(!pdo_fieldexists('tiny_wmall_deliveryer_getcash_log', 'addtime')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_deliveryer_getcash_log').' ADD `addtime` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_deliveryer_getcash_log')){if(!pdo_fieldexists('tiny_wmall_deliveryer_getcash_log', 'endtime')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_deliveryer_getcash_log').' ADD `endtime` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_fans')){if(!pdo_fieldexists('tiny_wmall_fans', 'id')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_fans').' ADD `id` int(10) unsigned NOT NULL auto_increment  COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_fans')){if(!pdo_fieldexists('tiny_wmall_fans', 'uniacid')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_fans').' ADD `uniacid` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_fans')){if(!pdo_fieldexists('tiny_wmall_fans', 'uid')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_fans').' ADD `uid` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_fans')){if(!pdo_fieldexists('tiny_wmall_fans', 'openid')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_fans').' ADD `openid` varchar(50) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_fans')){if(!pdo_fieldexists('tiny_wmall_fans', 'nickname')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_fans').' ADD `nickname` varchar(30) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_fans')){if(!pdo_fieldexists('tiny_wmall_fans', 'sex')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_fans').' ADD `sex` varchar(3) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_fans')){if(!pdo_fieldexists('tiny_wmall_fans', 'avatar')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_fans').' ADD `avatar` varchar(255) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_fans')){if(!pdo_fieldexists('tiny_wmall_fans', 'addtime')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_fans').' ADD `addtime` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_goods')){if(!pdo_fieldexists('tiny_wmall_goods', 'id')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_goods').' ADD `id` int(10) unsigned NOT NULL auto_increment  COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_goods')){if(!pdo_fieldexists('tiny_wmall_goods', 'uniacid')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_goods').' ADD `uniacid` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_goods')){if(!pdo_fieldexists('tiny_wmall_goods', 'sid')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_goods').' ADD `sid` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_goods')){if(!pdo_fieldexists('tiny_wmall_goods', 'cid')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_goods').' ADD `cid` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_goods')){if(!pdo_fieldexists('tiny_wmall_goods', 'title')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_goods').' ADD `title` varchar(30) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_goods')){if(!pdo_fieldexists('tiny_wmall_goods', 'price')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_goods').' ADD `price` varchar(500) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_goods')){if(!pdo_fieldexists('tiny_wmall_goods', 'discount_price')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_goods').' ADD `discount_price` varchar(500) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_goods')){if(!pdo_fieldexists('tiny_wmall_goods', 'is_options')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_goods').' ADD `is_options` tinyint(3) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_goods')){if(!pdo_fieldexists('tiny_wmall_goods', 'unitname')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_goods').' ADD `unitname` varchar(10) NOT NULL  DEFAULT 份 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_goods')){if(!pdo_fieldexists('tiny_wmall_goods', 'total')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_goods').' ADD `total` int(10) NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_goods')){if(!pdo_fieldexists('tiny_wmall_goods', 'sailed')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_goods').' ADD `sailed` int(10) unsigned NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_goods')){if(!pdo_fieldexists('tiny_wmall_goods', 'status')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_goods').' ADD `status` tinyint(3) unsigned NOT NULL  DEFAULT 1 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_goods')){if(!pdo_fieldexists('tiny_wmall_goods', 'is_hot')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_goods').' ADD `is_hot` tinyint(3) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_goods')){if(!pdo_fieldexists('tiny_wmall_goods', 'thumb')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_goods').' ADD `thumb` varchar(255) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_goods')){if(!pdo_fieldexists('tiny_wmall_goods', 'label')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_goods').' ADD `label` varchar(5) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_goods')){if(!pdo_fieldexists('tiny_wmall_goods', 'displayorder')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_goods').' ADD `displayorder` tinyint(3) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_goods')){if(!pdo_fieldexists('tiny_wmall_goods', 'description')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_goods').' ADD `description` text NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_goods')){if(!pdo_fieldexists('tiny_wmall_goods', 'comment_total')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_goods').' ADD `comment_total` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_goods')){if(!pdo_fieldexists('tiny_wmall_goods', 'comment_good')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_goods').' ADD `comment_good` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_goods_category')){if(!pdo_fieldexists('tiny_wmall_goods_category', 'id')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_goods_category').' ADD `id` int(10) unsigned NOT NULL auto_increment  COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_goods_category')){if(!pdo_fieldexists('tiny_wmall_goods_category', 'uniacid')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_goods_category').' ADD `uniacid` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_goods_category')){if(!pdo_fieldexists('tiny_wmall_goods_category', 'sid')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_goods_category').' ADD `sid` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_goods_category')){if(!pdo_fieldexists('tiny_wmall_goods_category', 'title')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_goods_category').' ADD `title` varchar(20) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_goods_category')){if(!pdo_fieldexists('tiny_wmall_goods_category', 'status')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_goods_category').' ADD `status` tinyint(3) unsigned NOT NULL  DEFAULT 1 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_goods_category')){if(!pdo_fieldexists('tiny_wmall_goods_category', 'displayorder')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_goods_category').' ADD `displayorder` tinyint(3) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_goods_options')){if(!pdo_fieldexists('tiny_wmall_goods_options', 'id')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_goods_options').' ADD `id` int(10) unsigned NOT NULL auto_increment  COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_goods_options')){if(!pdo_fieldexists('tiny_wmall_goods_options', 'uniacid')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_goods_options').' ADD `uniacid` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_goods_options')){if(!pdo_fieldexists('tiny_wmall_goods_options', 'sid')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_goods_options').' ADD `sid` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_goods_options')){if(!pdo_fieldexists('tiny_wmall_goods_options', 'goods_id')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_goods_options').' ADD `goods_id` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_goods_options')){if(!pdo_fieldexists('tiny_wmall_goods_options', 'name')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_goods_options').' ADD `name` varchar(50) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_goods_options')){if(!pdo_fieldexists('tiny_wmall_goods_options', 'price')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_goods_options').' ADD `price` varchar(50) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_goods_options')){if(!pdo_fieldexists('tiny_wmall_goods_options', 'total')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_goods_options').' ADD `total` int(10) NOT NULL  DEFAULT -1 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_goods_options')){if(!pdo_fieldexists('tiny_wmall_goods_options', 'displayorder')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_goods_options').' ADD `displayorder` tinyint(3) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_members')){if(!pdo_fieldexists('tiny_wmall_members', 'id')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_members').' ADD `id` int(10) unsigned NOT NULL auto_increment  COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_members')){if(!pdo_fieldexists('tiny_wmall_members', 'uniacid')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_members').' ADD `uniacid` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_members')){if(!pdo_fieldexists('tiny_wmall_members', 'uid')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_members').' ADD `uid` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_members')){if(!pdo_fieldexists('tiny_wmall_members', 'openid')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_members').' ADD `openid` varchar(50) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_members')){if(!pdo_fieldexists('tiny_wmall_members', 'avatar')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_members').' ADD `avatar` varchar(255) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_members')){if(!pdo_fieldexists('tiny_wmall_members', 'nickname')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_members').' ADD `nickname` varchar(50) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_members')){if(!pdo_fieldexists('tiny_wmall_members', 'sex')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_members').' ADD `sex` varchar(5) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_members')){if(!pdo_fieldexists('tiny_wmall_members', 'realname')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_members').' ADD `realname` varchar(20) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_members')){if(!pdo_fieldexists('tiny_wmall_members', 'mobile')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_members').' ADD `mobile` varchar(20) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_members')){if(!pdo_fieldexists('tiny_wmall_members', 'setmeal_id')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_members').' ADD `setmeal_id` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_members')){if(!pdo_fieldexists('tiny_wmall_members', 'setmeal_day_free_limit')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_members').' ADD `setmeal_day_free_limit` tinyint(3) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_members')){if(!pdo_fieldexists('tiny_wmall_members', 'setmeal_starttime')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_members').' ADD `setmeal_starttime` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_members')){if(!pdo_fieldexists('tiny_wmall_members', 'setmeal_endtime')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_members').' ADD `setmeal_endtime` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_members')){if(!pdo_fieldexists('tiny_wmall_members', 'first_order_time')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_members').' ADD `first_order_time` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_members')){if(!pdo_fieldexists('tiny_wmall_members', 'last_order_time')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_members').' ADD `last_order_time` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_members')){if(!pdo_fieldexists('tiny_wmall_members', 'success_num')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_members').' ADD `success_num` int(10) unsigned   DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_members')){if(!pdo_fieldexists('tiny_wmall_members', 'success_price')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_members').' ADD `success_price` varchar(20) NOT NULL  DEFAULT 0.00 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_members')){if(!pdo_fieldexists('tiny_wmall_members', 'cancel_num')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_members').' ADD `cancel_num` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_members')){if(!pdo_fieldexists('tiny_wmall_members', 'cancel_price')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_members').' ADD `cancel_price` varchar(20) NOT NULL  DEFAULT 0.00 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_members')){if(!pdo_fieldexists('tiny_wmall_members', 'is_sys')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_members').' ADD `is_sys` tinyint(3) unsigned NOT NULL  DEFAULT 1 COMMENT \'1:系统会员, 2:模块兼容会员\';');}}if(pdo_tableexists('tiny_wmall_members')){if(!pdo_fieldexists('tiny_wmall_members', 'search_data')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_members').' ADD `search_data` varchar(255) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_members')){if(!pdo_fieldexists('tiny_wmall_members', 'addtime')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_members').' ADD `addtime` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_order')){if(!pdo_fieldexists('tiny_wmall_order', 'id')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_order').' ADD `id` int(10) unsigned NOT NULL auto_increment  COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_order')){if(!pdo_fieldexists('tiny_wmall_order', 'uniacid')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_order').' ADD `uniacid` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_order')){if(!pdo_fieldexists('tiny_wmall_order', 'acid')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_order').' ADD `acid` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_order')){if(!pdo_fieldexists('tiny_wmall_order', 'sid')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_order').' ADD `sid` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_order')){if(!pdo_fieldexists('tiny_wmall_order', 'uid')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_order').' ADD `uid` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_order')){if(!pdo_fieldexists('tiny_wmall_order', 'groupid')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_order').' ADD `groupid` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_order')){if(!pdo_fieldexists('tiny_wmall_order', 'order_type')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_order').' ADD `order_type` tinyint(3) unsigned NOT NULL  DEFAULT 1 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_order')){if(!pdo_fieldexists('tiny_wmall_order', 'is_pay')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_order').' ADD `is_pay` tinyint(3) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_order')){if(!pdo_fieldexists('tiny_wmall_order', 'ordersn')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_order').' ADD `ordersn` varchar(20) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_order')){if(!pdo_fieldexists('tiny_wmall_order', 'code')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_order').' ADD `code` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_order')){if(!pdo_fieldexists('tiny_wmall_order', 'openid')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_order').' ADD `openid` varchar(50) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_order')){if(!pdo_fieldexists('tiny_wmall_order', 'username')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_order').' ADD `username` varchar(20) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_order')){if(!pdo_fieldexists('tiny_wmall_order', 'sex')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_order').' ADD `sex` varchar(5) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_order')){if(!pdo_fieldexists('tiny_wmall_order', 'mobile')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_order').' ADD `mobile` varchar(15) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_order')){if(!pdo_fieldexists('tiny_wmall_order', 'address')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_order').' ADD `address` varchar(100) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_order')){if(!pdo_fieldexists('tiny_wmall_order', 'number')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_order').' ADD `number` varchar(20) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_order')){if(!pdo_fieldexists('tiny_wmall_order', 'location_x')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_order').' ADD `location_x` varchar(20) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_order')){if(!pdo_fieldexists('tiny_wmall_order', 'location_y')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_order').' ADD `location_y` varchar(20) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_order')){if(!pdo_fieldexists('tiny_wmall_order', 'note')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_order').' ADD `note` varchar(200) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_order')){if(!pdo_fieldexists('tiny_wmall_order', 'price')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_order').' ADD `price` decimal(10,2) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_order')){if(!pdo_fieldexists('tiny_wmall_order', 'num')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_order').' ADD `num` tinyint(3) unsigned NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_order')){if(!pdo_fieldexists('tiny_wmall_order', 'delivery_day')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_order').' ADD `delivery_day` varchar(20) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_order')){if(!pdo_fieldexists('tiny_wmall_order', 'delivery_time')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_order').' ADD `delivery_time` varchar(15) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_order')){if(!pdo_fieldexists('tiny_wmall_order', 'pay_type')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_order').' ADD `pay_type` varchar(15) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_order')){if(!pdo_fieldexists('tiny_wmall_order', 'addtime')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_order').' ADD `addtime` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_order')){if(!pdo_fieldexists('tiny_wmall_order', 'paytime')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_order').' ADD `paytime` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_order')){if(!pdo_fieldexists('tiny_wmall_order', 'deliveryingtime')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_order').' ADD `deliveryingtime` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_order')){if(!pdo_fieldexists('tiny_wmall_order', 'deliveryedtime')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_order').' ADD `deliveryedtime` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_order')){if(!pdo_fieldexists('tiny_wmall_order', 'status')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_order').' ADD `status` tinyint(3) NOT NULL  DEFAULT 1 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_order')){if(!pdo_fieldexists('tiny_wmall_order', 'delivery_status')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_order').' ADD `delivery_status` tinyint(3) unsigned NOT NULL  DEFAULT 0 COMMENT \'3:待配送, 4:配送中, 5: 配送成功, 6: 配送失败\';');}}if(pdo_tableexists('tiny_wmall_order')){if(!pdo_fieldexists('tiny_wmall_order', 'delivery_type')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_order').' ADD `delivery_type` tinyint(3) unsigned NOT NULL  DEFAULT 1 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_order')){if(!pdo_fieldexists('tiny_wmall_order', 'is_comment')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_order').' ADD `is_comment` tinyint(3) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_order')){if(!pdo_fieldexists('tiny_wmall_order', 'print_nums')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_order').' ADD `print_nums` tinyint(3) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_order')){if(!pdo_fieldexists('tiny_wmall_order', 'delivery_fee')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_order').' ADD `delivery_fee` decimal(10,2) unsigned NOT NULL  DEFAULT 0.00 COMMENT \'外卖配送费\';');}}if(pdo_tableexists('tiny_wmall_order')){if(!pdo_fieldexists('tiny_wmall_order', 'pack_fee')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_order').' ADD `pack_fee` decimal(10,2) unsigned NOT NULL  DEFAULT 0.00 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_order')){if(!pdo_fieldexists('tiny_wmall_order', 'discount_fee')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_order').' ADD `discount_fee` varchar(20) NOT NULL  DEFAULT 0.00 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_order')){if(!pdo_fieldexists('tiny_wmall_order', 'total_fee')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_order').' ADD `total_fee` varchar(20) NOT NULL  DEFAULT 0.00 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_order')){if(!pdo_fieldexists('tiny_wmall_order', 'final_fee')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_order').' ADD `final_fee` varchar(20) NOT NULL  DEFAULT 0.00 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_order')){if(!pdo_fieldexists('tiny_wmall_order', 'vip_free_delivery_fee')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_order').' ADD `vip_free_delivery_fee` tinyint(3) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_order')){if(!pdo_fieldexists('tiny_wmall_order', 'invoice')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_order').' ADD `invoice` varchar(50) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_order')){if(!pdo_fieldexists('tiny_wmall_order', 'data')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_order').' ADD `data` varchar(1000) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_order')){if(!pdo_fieldexists('tiny_wmall_order', 'is_remind')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_order').' ADD `is_remind` tinyint(3) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_order')){if(!pdo_fieldexists('tiny_wmall_order', 'deliveryer_id')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_order').' ADD `deliveryer_id` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_order')){if(!pdo_fieldexists('tiny_wmall_order', 'is_refund')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_order').' ADD `is_refund` tinyint(3) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_order')){if(!pdo_fieldexists('tiny_wmall_order', 'person_num')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_order').' ADD `person_num` tinyint(3) unsigned NOT NULL  DEFAULT 1 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_order')){if(!pdo_fieldexists('tiny_wmall_order', 'table_id')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_order').' ADD `table_id` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_order')){if(!pdo_fieldexists('tiny_wmall_order', 'table_cid')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_order').' ADD `table_cid` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_order')){if(!pdo_fieldexists('tiny_wmall_order', 'reserve_type')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_order').' ADD `reserve_type` varchar(10) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_order')){if(!pdo_fieldexists('tiny_wmall_order', 'reserve_time')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_order').' ADD `reserve_time` varchar(30) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_order_cart')){if(!pdo_fieldexists('tiny_wmall_order_cart', 'id')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_order_cart').' ADD `id` int(10) unsigned NOT NULL auto_increment  COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_order_cart')){if(!pdo_fieldexists('tiny_wmall_order_cart', 'uniacid')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_order_cart').' ADD `uniacid` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_order_cart')){if(!pdo_fieldexists('tiny_wmall_order_cart', 'sid')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_order_cart').' ADD `sid` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_order_cart')){if(!pdo_fieldexists('tiny_wmall_order_cart', 'uid')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_order_cart').' ADD `uid` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_order_cart')){if(!pdo_fieldexists('tiny_wmall_order_cart', 'groupid')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_order_cart').' ADD `groupid` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_order_cart')){if(!pdo_fieldexists('tiny_wmall_order_cart', 'num')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_order_cart').' ADD `num` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_order_cart')){if(!pdo_fieldexists('tiny_wmall_order_cart', 'price')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_order_cart').' ADD `price` decimal(10,2) unsigned NOT NULL  DEFAULT 0.00 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_order_cart')){if(!pdo_fieldexists('tiny_wmall_order_cart', 'data')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_order_cart').' ADD `data` varchar(5000) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_order_cart')){if(!pdo_fieldexists('tiny_wmall_order_cart', 'num_data')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_order_cart').' ADD `num_data` varchar(2000) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_order_cart')){if(!pdo_fieldexists('tiny_wmall_order_cart', 'addtime')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_order_cart').' ADD `addtime` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_order_comment')){if(!pdo_fieldexists('tiny_wmall_order_comment', 'id')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_order_comment').' ADD `id` int(10) unsigned NOT NULL auto_increment  COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_order_comment')){if(!pdo_fieldexists('tiny_wmall_order_comment', 'uniacid')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_order_comment').' ADD `uniacid` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_order_comment')){if(!pdo_fieldexists('tiny_wmall_order_comment', 'oid')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_order_comment').' ADD `oid` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_order_comment')){if(!pdo_fieldexists('tiny_wmall_order_comment', 'uid')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_order_comment').' ADD `uid` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_order_comment')){if(!pdo_fieldexists('tiny_wmall_order_comment', 'sid')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_order_comment').' ADD `sid` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_order_comment')){if(!pdo_fieldexists('tiny_wmall_order_comment', 'username')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_order_comment').' ADD `username` varchar(20) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_order_comment')){if(!pdo_fieldexists('tiny_wmall_order_comment', 'avatar')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_order_comment').' ADD `avatar` varchar(255) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_order_comment')){if(!pdo_fieldexists('tiny_wmall_order_comment', 'mobile')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_order_comment').' ADD `mobile` varchar(15) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_order_comment')){if(!pdo_fieldexists('tiny_wmall_order_comment', 'goods_quality')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_order_comment').' ADD `goods_quality` tinyint(3) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_order_comment')){if(!pdo_fieldexists('tiny_wmall_order_comment', 'delivery_service')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_order_comment').' ADD `delivery_service` tinyint(3) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_order_comment')){if(!pdo_fieldexists('tiny_wmall_order_comment', 'score')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_order_comment').' ADD `score` tinyint(3) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_order_comment')){if(!pdo_fieldexists('tiny_wmall_order_comment', 'note')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_order_comment').' ADD `note` varchar(255) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_order_comment')){if(!pdo_fieldexists('tiny_wmall_order_comment', 'data')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_order_comment').' ADD `data` varchar(1000) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_order_comment')){if(!pdo_fieldexists('tiny_wmall_order_comment', 'thumbs')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_order_comment').' ADD `thumbs` varchar(3000) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_order_comment')){if(!pdo_fieldexists('tiny_wmall_order_comment', 'reply')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_order_comment').' ADD `reply` varchar(500) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_order_comment')){if(!pdo_fieldexists('tiny_wmall_order_comment', 'replytime')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_order_comment').' ADD `replytime` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_order_comment')){if(!pdo_fieldexists('tiny_wmall_order_comment', 'status')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_order_comment').' ADD `status` tinyint(3) unsigned NOT NULL  DEFAULT 1 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_order_comment')){if(!pdo_fieldexists('tiny_wmall_order_comment', 'addtime')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_order_comment').' ADD `addtime` int(10) NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_order_current_log')){if(!pdo_fieldexists('tiny_wmall_order_current_log', 'id')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_order_current_log').' ADD `id` int(10) unsigned NOT NULL auto_increment  COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_order_current_log')){if(!pdo_fieldexists('tiny_wmall_order_current_log', 'uniacid')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_order_current_log').' ADD `uniacid` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_order_current_log')){if(!pdo_fieldexists('tiny_wmall_order_current_log', 'acid')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_order_current_log').' ADD `acid` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_order_current_log')){if(!pdo_fieldexists('tiny_wmall_order_current_log', 'sid')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_order_current_log').' ADD `sid` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_order_current_log')){if(!pdo_fieldexists('tiny_wmall_order_current_log', 'uid')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_order_current_log').' ADD `uid` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_order_current_log')){if(!pdo_fieldexists('tiny_wmall_order_current_log', 'openid')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_order_current_log').' ADD `openid` varchar(50) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_order_current_log')){if(!pdo_fieldexists('tiny_wmall_order_current_log', 'username')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_order_current_log').' ADD `username` varchar(20) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_order_current_log')){if(!pdo_fieldexists('tiny_wmall_order_current_log', 'mobile')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_order_current_log').' ADD `mobile` varchar(20) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_order_current_log')){if(!pdo_fieldexists('tiny_wmall_order_current_log', 'orderid')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_order_current_log').' ADD `orderid` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_order_current_log')){if(!pdo_fieldexists('tiny_wmall_order_current_log', 'fee')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_order_current_log').' ADD `fee` decimal(10,2) unsigned NOT NULL  DEFAULT 0.00 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_order_current_log')){if(!pdo_fieldexists('tiny_wmall_order_current_log', 'is_pay')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_order_current_log').' ADD `is_pay` tinyint(3) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_order_current_log')){if(!pdo_fieldexists('tiny_wmall_order_current_log', 'pay_type')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_order_current_log').' ADD `pay_type` varchar(15) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_order_current_log')){if(!pdo_fieldexists('tiny_wmall_order_current_log', 'order_status')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_order_current_log').' ADD `order_status` tinyint(3) unsigned NOT NULL  DEFAULT 1 COMMENT \'订单状态\';');}}if(pdo_tableexists('tiny_wmall_order_current_log')){if(!pdo_fieldexists('tiny_wmall_order_current_log', 'trade_status')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_order_current_log').' ADD `trade_status` tinyint(3) unsigned NOT NULL  DEFAULT 2 COMMENT \'交易记录1:成功,2:进行中,3:失败,4:交易关闭.\';');}}if(pdo_tableexists('tiny_wmall_order_current_log')){if(!pdo_fieldexists('tiny_wmall_order_current_log', 'addtime')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_order_current_log').' ADD `addtime` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_order_current_log')){if(!pdo_fieldexists('tiny_wmall_order_current_log', 'remark')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_order_current_log').' ADD `remark` varchar(255) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_order_current_log')){if(!pdo_fieldexists('tiny_wmall_order_current_log', 'out_trade_no')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_order_current_log').' ADD `out_trade_no` varchar(40) NOT NULL   COMMENT \'商户支付订单号\';');}}if(pdo_tableexists('tiny_wmall_order_current_log')){if(!pdo_fieldexists('tiny_wmall_order_current_log', 'out_refund_no')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_order_current_log').' ADD `out_refund_no` varchar(40) NOT NULL   COMMENT \'商户退款订单号\';');}}if(pdo_tableexists('tiny_wmall_order_current_log')){if(!pdo_fieldexists('tiny_wmall_order_current_log', 'refund_status')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_order_current_log').' ADD `refund_status` tinyint(3) unsigned NOT NULL  DEFAULT 0 COMMENT \'1:申请中, 2:退款中, 3:退款成功, 4:退款失败\';');}}if(pdo_tableexists('tiny_wmall_order_current_log')){if(!pdo_fieldexists('tiny_wmall_order_current_log', 'refund_time')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_order_current_log').' ADD `refund_time` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_order_current_log')){if(!pdo_fieldexists('tiny_wmall_order_current_log', 'refund_channel')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_order_current_log').' ADD `refund_channel` varchar(20) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_order_current_log')){if(!pdo_fieldexists('tiny_wmall_order_current_log', 'refund_account')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_order_current_log').' ADD `refund_account` varchar(50) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_order_current_log')){if(!pdo_fieldexists('tiny_wmall_order_current_log', 'delivery_type')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_order_current_log').' ADD `delivery_type` tinyint(3) unsigned NOT NULL  DEFAULT 1 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_order_current_log')){if(!pdo_fieldexists('tiny_wmall_order_current_log', 'deliveryer_id')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_order_current_log').' ADD `deliveryer_id` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_order_current_log')){if(!pdo_fieldexists('tiny_wmall_order_current_log', 'deliveryer_fee')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_order_current_log').' ADD `deliveryer_fee` varchar(10) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_order_current_log')){if(!pdo_fieldexists('tiny_wmall_order_current_log', 'store_deliveryer_fee')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_order_current_log').' ADD `store_deliveryer_fee` varchar(10) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_order_current_log')){if(!pdo_fieldexists('tiny_wmall_order_current_log', 'vip_free_delivery_fee')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_order_current_log').' ADD `vip_free_delivery_fee` tinyint(3) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_order_current_log')){if(!pdo_fieldexists('tiny_wmall_order_current_log', 'final_fee')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_order_current_log').' ADD `final_fee` decimal(10,2) NOT NULL  DEFAULT 0.00 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_order_discount')){if(!pdo_fieldexists('tiny_wmall_order_discount', 'id')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_order_discount').' ADD `id` int(10) unsigned NOT NULL auto_increment  COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_order_discount')){if(!pdo_fieldexists('tiny_wmall_order_discount', 'uniacid')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_order_discount').' ADD `uniacid` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_order_discount')){if(!pdo_fieldexists('tiny_wmall_order_discount', 'sid')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_order_discount').' ADD `sid` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_order_discount')){if(!pdo_fieldexists('tiny_wmall_order_discount', 'oid')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_order_discount').' ADD `oid` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_order_discount')){if(!pdo_fieldexists('tiny_wmall_order_discount', 'type')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_order_discount').' ADD `type` varchar(20) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_order_discount')){if(!pdo_fieldexists('tiny_wmall_order_discount', 'name')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_order_discount').' ADD `name` varchar(20) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_order_discount')){if(!pdo_fieldexists('tiny_wmall_order_discount', 'icon')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_order_discount').' ADD `icon` varchar(20) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_order_discount')){if(!pdo_fieldexists('tiny_wmall_order_discount', 'note')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_order_discount').' ADD `note` varchar(50) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_order_discount')){if(!pdo_fieldexists('tiny_wmall_order_discount', 'fee')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_order_discount').' ADD `fee` varchar(20) NOT NULL  DEFAULT 0.00 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_order_print_log')){if(!pdo_fieldexists('tiny_wmall_order_print_log', 'id')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_order_print_log').' ADD `id` int(10) unsigned NOT NULL auto_increment  COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_order_print_log')){if(!pdo_fieldexists('tiny_wmall_order_print_log', 'uniacid')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_order_print_log').' ADD `uniacid` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_order_print_log')){if(!pdo_fieldexists('tiny_wmall_order_print_log', 'sid')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_order_print_log').' ADD `sid` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_order_print_log')){if(!pdo_fieldexists('tiny_wmall_order_print_log', 'pid')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_order_print_log').' ADD `pid` tinyint(3) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_order_print_log')){if(!pdo_fieldexists('tiny_wmall_order_print_log', 'oid')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_order_print_log').' ADD `oid` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_order_print_log')){if(!pdo_fieldexists('tiny_wmall_order_print_log', 'foid')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_order_print_log').' ADD `foid` varchar(50) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_order_print_log')){if(!pdo_fieldexists('tiny_wmall_order_print_log', 'status')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_order_print_log').' ADD `status` tinyint(3) unsigned NOT NULL  DEFAULT 2 COMMENT \'1:打印成功,2:打印未成功\';');}}if(pdo_tableexists('tiny_wmall_order_print_log')){if(!pdo_fieldexists('tiny_wmall_order_print_log', 'printer_type')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_order_print_log').' ADD `printer_type` varchar(20) NOT NULL  DEFAULT feie COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_order_print_log')){if(!pdo_fieldexists('tiny_wmall_order_print_log', 'addtime')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_order_print_log').' ADD `addtime` int(10) unsigned NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_order_refund_log')){if(!pdo_fieldexists('tiny_wmall_order_refund_log', 'id')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_order_refund_log').' ADD `id` int(10) unsigned NOT NULL auto_increment  COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_order_refund_log')){if(!pdo_fieldexists('tiny_wmall_order_refund_log', 'uniacid')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_order_refund_log').' ADD `uniacid` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_order_refund_log')){if(!pdo_fieldexists('tiny_wmall_order_refund_log', 'sid')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_order_refund_log').' ADD `sid` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_order_refund_log')){if(!pdo_fieldexists('tiny_wmall_order_refund_log', 'oid')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_order_refund_log').' ADD `oid` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_order_refund_log')){if(!pdo_fieldexists('tiny_wmall_order_refund_log', 'status')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_order_refund_log').' ADD `status` tinyint(3) unsigned NOT NULL  DEFAULT 1 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_order_refund_log')){if(!pdo_fieldexists('tiny_wmall_order_refund_log', 'type')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_order_refund_log').' ADD `type` varchar(20) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_order_refund_log')){if(!pdo_fieldexists('tiny_wmall_order_refund_log', 'title')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_order_refund_log').' ADD `title` varchar(30) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_order_refund_log')){if(!pdo_fieldexists('tiny_wmall_order_refund_log', 'note')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_order_refund_log').' ADD `note` varchar(255) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_order_refund_log')){if(!pdo_fieldexists('tiny_wmall_order_refund_log', 'addtime')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_order_refund_log').' ADD `addtime` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_order_stat')){if(!pdo_fieldexists('tiny_wmall_order_stat', 'id')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_order_stat').' ADD `id` int(10) unsigned NOT NULL auto_increment  COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_order_stat')){if(!pdo_fieldexists('tiny_wmall_order_stat', 'oid')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_order_stat').' ADD `oid` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_order_stat')){if(!pdo_fieldexists('tiny_wmall_order_stat', 'uniacid')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_order_stat').' ADD `uniacid` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_order_stat')){if(!pdo_fieldexists('tiny_wmall_order_stat', 'sid')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_order_stat').' ADD `sid` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_order_stat')){if(!pdo_fieldexists('tiny_wmall_order_stat', 'goods_id')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_order_stat').' ADD `goods_id` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_order_stat')){if(!pdo_fieldexists('tiny_wmall_order_stat', 'goods_cid')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_order_stat').' ADD `goods_cid` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_order_stat')){if(!pdo_fieldexists('tiny_wmall_order_stat', 'goods_num')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_order_stat').' ADD `goods_num` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_order_stat')){if(!pdo_fieldexists('tiny_wmall_order_stat', 'goods_title')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_order_stat').' ADD `goods_title` varchar(30) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_order_stat')){if(!pdo_fieldexists('tiny_wmall_order_stat', 'goods_unit_price')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_order_stat').' ADD `goods_unit_price` varchar(10) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_order_stat')){if(!pdo_fieldexists('tiny_wmall_order_stat', 'goods_price')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_order_stat').' ADD `goods_price` decimal(10,2) unsigned NOT NULL  DEFAULT 0.00 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_order_stat')){if(!pdo_fieldexists('tiny_wmall_order_stat', 'status')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_order_stat').' ADD `status` tinyint(3) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_order_stat')){if(!pdo_fieldexists('tiny_wmall_order_stat', 'addtime')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_order_stat').' ADD `addtime` int(10) NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_order_status_log')){if(!pdo_fieldexists('tiny_wmall_order_status_log', 'id')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_order_status_log').' ADD `id` int(10) unsigned NOT NULL auto_increment  COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_order_status_log')){if(!pdo_fieldexists('tiny_wmall_order_status_log', 'uniacid')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_order_status_log').' ADD `uniacid` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_order_status_log')){if(!pdo_fieldexists('tiny_wmall_order_status_log', 'sid')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_order_status_log').' ADD `sid` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_order_status_log')){if(!pdo_fieldexists('tiny_wmall_order_status_log', 'oid')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_order_status_log').' ADD `oid` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_order_status_log')){if(!pdo_fieldexists('tiny_wmall_order_status_log', 'status')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_order_status_log').' ADD `status` tinyint(3) unsigned NOT NULL  DEFAULT 1 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_order_status_log')){if(!pdo_fieldexists('tiny_wmall_order_status_log', 'type')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_order_status_log').' ADD `type` varchar(20) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_order_status_log')){if(!pdo_fieldexists('tiny_wmall_order_status_log', 'title')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_order_status_log').' ADD `title` varchar(30) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_order_status_log')){if(!pdo_fieldexists('tiny_wmall_order_status_log', 'note')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_order_status_log').' ADD `note` varchar(255) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_order_status_log')){if(!pdo_fieldexists('tiny_wmall_order_status_log', 'addtime')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_order_status_log').' ADD `addtime` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_paylog')){if(!pdo_fieldexists('tiny_wmall_paylog', 'id')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_paylog').' ADD `id` int(10) unsigned NOT NULL auto_increment  COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_paylog')){if(!pdo_fieldexists('tiny_wmall_paylog', 'uniacid')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_paylog').' ADD `uniacid` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_paylog')){if(!pdo_fieldexists('tiny_wmall_paylog', 'order_sn')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_paylog').' ADD `order_sn` varchar(20) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_paylog')){if(!pdo_fieldexists('tiny_wmall_paylog', 'order_id')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_paylog').' ADD `order_id` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_paylog')){if(!pdo_fieldexists('tiny_wmall_paylog', 'order_type')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_paylog').' ADD `order_type` varchar(10) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_paylog')){if(!pdo_fieldexists('tiny_wmall_paylog', 'fee')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_paylog').' ADD `fee` varchar(10) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_paylog')){if(!pdo_fieldexists('tiny_wmall_paylog', 'status')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_paylog').' ADD `status` tinyint(3) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_paylog')){if(!pdo_fieldexists('tiny_wmall_paylog', 'addtime')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_paylog').' ADD `addtime` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_paylog')){if(!pdo_fieldexists('tiny_wmall_paylog', 'paytime')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_paylog').' ADD `paytime` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_printer')){if(!pdo_fieldexists('tiny_wmall_printer', 'id')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_printer').' ADD `id` int(10) unsigned NOT NULL auto_increment  COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_printer')){if(!pdo_fieldexists('tiny_wmall_printer', 'uniacid')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_printer').' ADD `uniacid` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_printer')){if(!pdo_fieldexists('tiny_wmall_printer', 'sid')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_printer').' ADD `sid` int(10) unsigned NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_printer')){if(!pdo_fieldexists('tiny_wmall_printer', 'name')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_printer').' ADD `name` varchar(20) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_printer')){if(!pdo_fieldexists('tiny_wmall_printer', 'type')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_printer').' ADD `type` varchar(20) NOT NULL  DEFAULT feie COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_printer')){if(!pdo_fieldexists('tiny_wmall_printer', 'print_no')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_printer').' ADD `print_no` varchar(30) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_printer')){if(!pdo_fieldexists('tiny_wmall_printer', 'member_code')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_printer').' ADD `member_code` varchar(50) NOT NULL   COMMENT \'飞蛾打印机机器号\';');}}if(pdo_tableexists('tiny_wmall_printer')){if(!pdo_fieldexists('tiny_wmall_printer', 'key')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_printer').' ADD `key` varchar(30) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_printer')){if(!pdo_fieldexists('tiny_wmall_printer', 'api_key')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_printer').' ADD `api_key` varchar(100) NOT NULL   COMMENT \'易联云打印机api_key\';');}}if(pdo_tableexists('tiny_wmall_printer')){if(!pdo_fieldexists('tiny_wmall_printer', 'print_nums')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_printer').' ADD `print_nums` tinyint(3) unsigned NOT NULL  DEFAULT 1 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_printer')){if(!pdo_fieldexists('tiny_wmall_printer', 'qrcode_link')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_printer').' ADD `qrcode_link` varchar(100) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_printer')){if(!pdo_fieldexists('tiny_wmall_printer', 'print_header')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_printer').' ADD `print_header` varchar(50) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_printer')){if(!pdo_fieldexists('tiny_wmall_printer', 'print_footer')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_printer').' ADD `print_footer` varchar(50) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_printer')){if(!pdo_fieldexists('tiny_wmall_printer', 'status')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_printer').' ADD `status` tinyint(3) unsigned NOT NULL  DEFAULT 1 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_printer')){if(!pdo_fieldexists('tiny_wmall_printer', 'delivery_type_w6muyouwlcom_195')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_printer').' ADD `delivery_type_w6muyouwlcom_195` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_reply')){if(!pdo_fieldexists('tiny_wmall_reply', 'id')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_reply').' ADD `id` int(10) unsigned NOT NULL auto_increment  COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_reply')){if(!pdo_fieldexists('tiny_wmall_reply', 'uniacid')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_reply').' ADD `uniacid` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_reply')){if(!pdo_fieldexists('tiny_wmall_reply', 'sid')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_reply').' ADD `sid` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_reply')){if(!pdo_fieldexists('tiny_wmall_reply', 'rid')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_reply').' ADD `rid` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_reply')){if(!pdo_fieldexists('tiny_wmall_reply', 'type')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_reply').' ADD `type` varchar(50)    COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_reply')){if(!pdo_fieldexists('tiny_wmall_reply', 'table_id')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_reply').' ADD `table_id` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_report')){if(!pdo_fieldexists('tiny_wmall_report', 'id')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_report').' ADD `id` int(10) unsigned NOT NULL auto_increment  COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_report')){if(!pdo_fieldexists('tiny_wmall_report', 'uniacid')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_report').' ADD `uniacid` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_report')){if(!pdo_fieldexists('tiny_wmall_report', 'acid')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_report').' ADD `acid` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_report')){if(!pdo_fieldexists('tiny_wmall_report', 'sid')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_report').' ADD `sid` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_report')){if(!pdo_fieldexists('tiny_wmall_report', 'uid')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_report').' ADD `uid` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_report')){if(!pdo_fieldexists('tiny_wmall_report', 'openid')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_report').' ADD `openid` varchar(50) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_report')){if(!pdo_fieldexists('tiny_wmall_report', 'mobile')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_report').' ADD `mobile` varchar(20) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_report')){if(!pdo_fieldexists('tiny_wmall_report', 'title')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_report').' ADD `title` varchar(255) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_report')){if(!pdo_fieldexists('tiny_wmall_report', 'note')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_report').' ADD `note` varchar(255) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_report')){if(!pdo_fieldexists('tiny_wmall_report', 'thumbs')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_report').' ADD `thumbs` varchar(2000) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_report')){if(!pdo_fieldexists('tiny_wmall_report', 'status')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_report').' ADD `status` tinyint(3) NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_report')){if(!pdo_fieldexists('tiny_wmall_report', 'addtime')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_report').' ADD `addtime` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_reserve')){if(!pdo_fieldexists('tiny_wmall_reserve', 'id')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_reserve').' ADD `id` int(10) unsigned NOT NULL auto_increment  COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_reserve')){if(!pdo_fieldexists('tiny_wmall_reserve', 'uniacid')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_reserve').' ADD `uniacid` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_reserve')){if(!pdo_fieldexists('tiny_wmall_reserve', 'sid')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_reserve').' ADD `sid` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_reserve')){if(!pdo_fieldexists('tiny_wmall_reserve', 'time')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_reserve').' ADD `time` varchar(15) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_reserve')){if(!pdo_fieldexists('tiny_wmall_reserve', 'table_cid')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_reserve').' ADD `table_cid` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_reserve')){if(!pdo_fieldexists('tiny_wmall_reserve', 'addtime')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_reserve').' ADD `addtime` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_slide')){if(!pdo_fieldexists('tiny_wmall_slide', 'id')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_slide').' ADD `id` int(10) unsigned NOT NULL auto_increment  COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_slide')){if(!pdo_fieldexists('tiny_wmall_slide', 'uniacid')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_slide').' ADD `uniacid` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_slide')){if(!pdo_fieldexists('tiny_wmall_slide', 'title')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_slide').' ADD `title` varchar(30) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_slide')){if(!pdo_fieldexists('tiny_wmall_slide', 'thumb')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_slide').' ADD `thumb` varchar(255) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_slide')){if(!pdo_fieldexists('tiny_wmall_slide', 'link')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_slide').' ADD `link` varchar(255) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_slide')){if(!pdo_fieldexists('tiny_wmall_slide', 'type')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_slide').' ADD `type` tinyint(3) unsigned NOT NULL  DEFAULT 1 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_slide')){if(!pdo_fieldexists('tiny_wmall_slide', 'status')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_slide').' ADD `status` tinyint(3) unsigned NOT NULL  DEFAULT 1 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_sms_send_log')){if(!pdo_fieldexists('tiny_wmall_sms_send_log', 'id')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_sms_send_log').' ADD `id` int(10) unsigned NOT NULL auto_increment  COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_sms_send_log')){if(!pdo_fieldexists('tiny_wmall_sms_send_log', 'uniacid')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_sms_send_log').' ADD `uniacid` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_sms_send_log')){if(!pdo_fieldexists('tiny_wmall_sms_send_log', 'sid')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_sms_send_log').' ADD `sid` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_sms_send_log')){if(!pdo_fieldexists('tiny_wmall_sms_send_log', 'type')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_sms_send_log').' ADD `type` varchar(20) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_sms_send_log')){if(!pdo_fieldexists('tiny_wmall_sms_send_log', 'mobile')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_sms_send_log').' ADD `mobile` varchar(20) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_sms_send_log')){if(!pdo_fieldexists('tiny_wmall_sms_send_log', 'sendtime')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_sms_send_log').' ADD `sendtime` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_store')){if(!pdo_fieldexists('tiny_wmall_store', 'id')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_store').' ADD `id` int(10) unsigned NOT NULL auto_increment  COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_store')){if(!pdo_fieldexists('tiny_wmall_store', 'uniacid')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_store').' ADD `uniacid` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_store')){if(!pdo_fieldexists('tiny_wmall_store', 'cid')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_store').' ADD `cid` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_store')){if(!pdo_fieldexists('tiny_wmall_store', 'title')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_store').' ADD `title` varchar(30) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_store')){if(!pdo_fieldexists('tiny_wmall_store', 'logo')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_store').' ADD `logo` varchar(100) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_store')){if(!pdo_fieldexists('tiny_wmall_store', 'telephone')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_store').' ADD `telephone` varchar(15) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_store')){if(!pdo_fieldexists('tiny_wmall_store', 'business_hours')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_store').' ADD `business_hours` varchar(200) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_store')){if(!pdo_fieldexists('tiny_wmall_store', 'description')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_store').' ADD `description` text NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_store')){if(!pdo_fieldexists('tiny_wmall_store', 'send_price')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_store').' ADD `send_price` smallint(5) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_store')){if(!pdo_fieldexists('tiny_wmall_store', 'delivery_price')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_store').' ADD `delivery_price` smallint(5) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_store')){if(!pdo_fieldexists('tiny_wmall_store', 'delivery_free_price')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_store').' ADD `delivery_free_price` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_store')){if(!pdo_fieldexists('tiny_wmall_store', 'pack_price')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_store').' ADD `pack_price` float(10,2) unsigned NOT NULL  DEFAULT 0.00 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_store')){if(!pdo_fieldexists('tiny_wmall_store', 'delivery_time')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_store').' ADD `delivery_time` tinyint(3) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_store')){if(!pdo_fieldexists('tiny_wmall_store', 'delivery_type')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_store').' ADD `delivery_type` tinyint(3) unsigned NOT NULL  DEFAULT 1 COMMENT \'1:商家配送,2:到店自提,3:两种都支持\';');}}if(pdo_tableexists('tiny_wmall_store')){if(!pdo_fieldexists('tiny_wmall_store', 'delivery_type_')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_store').' ADD `delivery_type_` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_store')){if(!pdo_fieldexists('tiny_wmall_store', 'delivery_within_days')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_store').' ADD `delivery_within_days` tinyint(3) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_store')){if(!pdo_fieldexists('tiny_wmall_store', 'delivery_reserve_days')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_store').' ADD `delivery_reserve_days` tinyint(3) unsigned   DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_store')){if(!pdo_fieldexists('tiny_wmall_store', 'serve_radius')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_store').' ADD `serve_radius` tinyint(3) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_store')){if(!pdo_fieldexists('tiny_wmall_store', 'delivery_area')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_store').' ADD `delivery_area` varchar(50) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_store')){if(!pdo_fieldexists('tiny_wmall_store', 'thumbs')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_store').' ADD `thumbs` varchar(1000) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_store')){if(!pdo_fieldexists('tiny_wmall_store', 'address')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_store').' ADD `address` varchar(50) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_store')){if(!pdo_fieldexists('tiny_wmall_store', 'location_x')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_store').' ADD `location_x` varchar(15) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_store')){if(!pdo_fieldexists('tiny_wmall_store', 'location_y')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_store').' ADD `location_y` varchar(15) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_store')){if(!pdo_fieldexists('tiny_wmall_store', 'status')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_store').' ADD `status` tinyint(3) unsigned NOT NULL  DEFAULT 1 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_store')){if(!pdo_fieldexists('tiny_wmall_store', 'displayorder')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_store').' ADD `displayorder` tinyint(3) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_store')){if(!pdo_fieldexists('tiny_wmall_store', 'mobile_verify')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_store').' ADD `mobile_verify` varchar(255) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_store')){if(!pdo_fieldexists('tiny_wmall_store', 'sns')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_store').' ADD `sns` varchar(255) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_store')){if(!pdo_fieldexists('tiny_wmall_store', 'notice')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_store').' ADD `notice` varchar(100) NOT NULL   COMMENT \'公告\';');}}if(pdo_tableexists('tiny_wmall_store')){if(!pdo_fieldexists('tiny_wmall_store', 'content')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_store').' ADD `content` varchar(255) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_store')){if(!pdo_fieldexists('tiny_wmall_store', 'payment')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_store').' ADD `payment` varchar(255) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_store')){if(!pdo_fieldexists('tiny_wmall_store', 'invoice_status')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_store').' ADD `invoice_status` tinyint(3) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_store')){if(!pdo_fieldexists('tiny_wmall_store', 'token_status')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_store').' ADD `token_status` tinyint(3) unsigned   DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_store')){if(!pdo_fieldexists('tiny_wmall_store', 'pay_time_limit')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_store').' ADD `pay_time_limit` tinyint(3) unsigned NOT NULL  DEFAULT 15 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_store')){if(!pdo_fieldexists('tiny_wmall_store', 'remind_time_limit')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_store').' ADD `remind_time_limit` tinyint(3) unsigned NOT NULL  DEFAULT 10 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_store')){if(!pdo_fieldexists('tiny_wmall_store', 'remind_reply')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_store').' ADD `remind_reply` varchar(1500) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_store')){if(!pdo_fieldexists('tiny_wmall_store', 'comment_reply')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_store').' ADD `comment_reply` varchar(2000) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_store')){if(!pdo_fieldexists('tiny_wmall_store', 'sailed')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_store').' ADD `sailed` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_store')){if(!pdo_fieldexists('tiny_wmall_store', 'score')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_store').' ADD `score` varchar(10) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_store')){if(!pdo_fieldexists('tiny_wmall_store', 'first_order_status')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_store').' ADD `first_order_status` tinyint(3) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_store')){if(!pdo_fieldexists('tiny_wmall_store', 'discount_status')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_store').' ADD `discount_status` tinyint(3) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_store')){if(!pdo_fieldexists('tiny_wmall_store', 'grant_status')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_store').' ADD `grant_status` tinyint(3) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_store')){if(!pdo_fieldexists('tiny_wmall_store', 'bargain_price_status')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_store').' ADD `bargain_price_status` tinyint(3) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_store')){if(!pdo_fieldexists('tiny_wmall_store', 'reserve_status')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_store').' ADD `reserve_status` tinyint(3) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_store')){if(!pdo_fieldexists('tiny_wmall_store', 'collect_coupon_status')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_store').' ADD `collect_coupon_status` tinyint(3) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_store')){if(!pdo_fieldexists('tiny_wmall_store', 'grant_coupon_status')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_store').' ADD `grant_coupon_status` tinyint(3) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_store')){if(!pdo_fieldexists('tiny_wmall_store', 'amount_status')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_store').' ADD `amount_status` tinyint(3) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_store')){if(!pdo_fieldexists('tiny_wmall_store', 'comment_status')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_store').' ADD `comment_status` tinyint(3) unsigned NOT NULL  DEFAULT 1 COMMENT \'评论审核.1:直接通过\';');}}if(pdo_tableexists('tiny_wmall_store')){if(!pdo_fieldexists('tiny_wmall_store', 'sms_use_times')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_store').' ADD `sms_use_times` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'短信使用条数\';');}}if(pdo_tableexists('tiny_wmall_store')){if(!pdo_fieldexists('tiny_wmall_store', 'wechat_qrcode')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_store').' ADD `wechat_qrcode` varchar(500) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_store')){if(!pdo_fieldexists('tiny_wmall_store', 'custom_url')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_store').' ADD `custom_url` varchar(500) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_store')){if(!pdo_fieldexists('tiny_wmall_store', 'addtype')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_store').' ADD `addtype` tinyint(3) unsigned NOT NULL  DEFAULT 1 COMMENT \'1:后台添加,2:申请入驻\';');}}if(pdo_tableexists('tiny_wmall_store')){if(!pdo_fieldexists('tiny_wmall_store', 'addtime')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_store').' ADD `addtime` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_store')){if(!pdo_fieldexists('tiny_wmall_store', 'template')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_store').' ADD `template` varchar(20) NOT NULL  DEFAULT index COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_store')){if(!pdo_fieldexists('tiny_wmall_store', 'pc_notice_status')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_store').' ADD `pc_notice_status` tinyint(3) unsigned NOT NULL  DEFAULT 1 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_store')){if(!pdo_fieldexists('tiny_wmall_store', 'not_in_serve_radius')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_store').' ADD `not_in_serve_radius` tinyint(3) unsigned NOT NULL  DEFAULT 1 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_store')){if(!pdo_fieldexists('tiny_wmall_store', 'auto_handel_order')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_store').' ADD `auto_handel_order` tinyint(3) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_store')){if(!pdo_fieldexists('tiny_wmall_store', 'auto_get_address')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_store').' ADD `auto_get_address` tinyint(3) unsigned NOT NULL  DEFAULT 1 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_store')){if(!pdo_fieldexists('tiny_wmall_store', 'auto_notice_deliveryer')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_store').' ADD `auto_notice_deliveryer` tinyint(3) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_store')){if(!pdo_fieldexists('tiny_wmall_store', 'auto_end_hours')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_store').' ADD `auto_end_hours` tinyint(3) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_store')){if(!pdo_fieldexists('tiny_wmall_store', 'click')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_store').' ADD `click` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_store')){if(!pdo_fieldexists('tiny_wmall_store', 'is_recommend')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_store').' ADD `is_recommend` tinyint(3) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_store')){if(!pdo_fieldexists('tiny_wmall_store', 'is_assign')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_store').' ADD `is_assign` tinyint(3) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_store')){if(!pdo_fieldexists('tiny_wmall_store', 'is_reserve')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_store').' ADD `is_reserve` tinyint(3) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_store')){if(!pdo_fieldexists('tiny_wmall_store', 'is_meal')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_store').' ADD `is_meal` tinyint(3) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_store')){if(!pdo_fieldexists('tiny_wmall_store', 'forward_mode')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_store').' ADD `forward_mode` varchar(15) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_store')){if(!pdo_fieldexists('tiny_wmall_store', 'assign_mode')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_store').' ADD `assign_mode` tinyint(3) unsigned NOT NULL  DEFAULT 1 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_store')){if(!pdo_fieldexists('tiny_wmall_store', 'assign_qrcode')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_store').' ADD `assign_qrcode` varchar(255) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_store')){if(!pdo_fieldexists('tiny_wmall_store', 'delivery_mode')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_store').' ADD `delivery_mode` tinyint(3) unsigned NOT NULL  DEFAULT 1 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_store_account')){if(!pdo_fieldexists('tiny_wmall_store_account', 'id')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_store_account').' ADD `id` int(10) unsigned NOT NULL auto_increment  COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_store_account')){if(!pdo_fieldexists('tiny_wmall_store_account', 'uniacid')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_store_account').' ADD `uniacid` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_store_account')){if(!pdo_fieldexists('tiny_wmall_store_account', 'sid')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_store_account').' ADD `sid` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_store_account')){if(!pdo_fieldexists('tiny_wmall_store_account', 'amount')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_store_account').' ADD `amount` decimal(10,2) NOT NULL  DEFAULT 0.00 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_store_account')){if(!pdo_fieldexists('tiny_wmall_store_account', 'fee_limit')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_store_account').' ADD `fee_limit` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_store_account')){if(!pdo_fieldexists('tiny_wmall_store_account', 'fee_rate')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_store_account').' ADD `fee_rate` varchar(10) NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_store_account')){if(!pdo_fieldexists('tiny_wmall_store_account', 'fee_min')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_store_account').' ADD `fee_min` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_store_account')){if(!pdo_fieldexists('tiny_wmall_store_account', 'fee_max')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_store_account').' ADD `fee_max` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_store_account')){if(!pdo_fieldexists('tiny_wmall_store_account', 'wechat')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_store_account').' ADD `wechat` varchar(1000) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_store_account')){if(!pdo_fieldexists('tiny_wmall_store_account', 'alipay')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_store_account').' ADD `alipay` varchar(500) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_store_account')){if(!pdo_fieldexists('tiny_wmall_store_account', 'delivery_type')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_store_account').' ADD `delivery_type` tinyint(3) unsigned NOT NULL  DEFAULT 1 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_store_account')){if(!pdo_fieldexists('tiny_wmall_store_account', 'delivery_price')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_store_account').' ADD `delivery_price` varchar(10) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_store_activity')){if(!pdo_fieldexists('tiny_wmall_store_activity', 'id')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_store_activity').' ADD `id` int(10) unsigned NOT NULL auto_increment  COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_store_activity')){if(!pdo_fieldexists('tiny_wmall_store_activity', 'uniacid')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_store_activity').' ADD `uniacid` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_store_activity')){if(!pdo_fieldexists('tiny_wmall_store_activity', 'sid')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_store_activity').' ADD `sid` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_store_activity')){if(!pdo_fieldexists('tiny_wmall_store_activity', 'first_order_status')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_store_activity').' ADD `first_order_status` tinyint(3) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_store_activity')){if(!pdo_fieldexists('tiny_wmall_store_activity', 'first_order_data')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_store_activity').' ADD `first_order_data` varchar(1500) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_store_activity')){if(!pdo_fieldexists('tiny_wmall_store_activity', 'discount_status')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_store_activity').' ADD `discount_status` tinyint(3) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_store_activity')){if(!pdo_fieldexists('tiny_wmall_store_activity', 'discount_data')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_store_activity').' ADD `discount_data` varchar(1500) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_store_activity')){if(!pdo_fieldexists('tiny_wmall_store_activity', 'grant_status')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_store_activity').' ADD `grant_status` tinyint(3) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_store_activity')){if(!pdo_fieldexists('tiny_wmall_store_activity', 'grant_data')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_store_activity').' ADD `grant_data` varchar(500) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_store_activity')){if(!pdo_fieldexists('tiny_wmall_store_activity', 'collect_coupon_status')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_store_activity').' ADD `collect_coupon_status` tinyint(3) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_store_activity')){if(!pdo_fieldexists('tiny_wmall_store_activity', 'grant_coupon_status')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_store_activity').' ADD `grant_coupon_status` tinyint(3) NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_store_activity')){if(!pdo_fieldexists('tiny_wmall_store_activity', 'amount_status')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_store_activity').' ADD `amount_status` tinyint(3) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_store_activity')){if(!pdo_fieldexists('tiny_wmall_store_activity', 'amount_data')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_store_activity').' ADD `amount_data` varchar(1000) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_store_category')){if(!pdo_fieldexists('tiny_wmall_store_category', 'id')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_store_category').' ADD `id` int(10) unsigned NOT NULL auto_increment  COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_store_category')){if(!pdo_fieldexists('tiny_wmall_store_category', 'uniacid')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_store_category').' ADD `uniacid` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_store_category')){if(!pdo_fieldexists('tiny_wmall_store_category', 'title')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_store_category').' ADD `title` varchar(20) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_store_category')){if(!pdo_fieldexists('tiny_wmall_store_category', 'thumb')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_store_category').' ADD `thumb` varchar(255) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_store_category')){if(!pdo_fieldexists('tiny_wmall_store_category', 'displayorder')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_store_category').' ADD `displayorder` tinyint(3) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_store_current_log')){if(!pdo_fieldexists('tiny_wmall_store_current_log', 'id')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_store_current_log').' ADD `id` int(10) unsigned NOT NULL auto_increment  COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_store_current_log')){if(!pdo_fieldexists('tiny_wmall_store_current_log', 'uniacid')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_store_current_log').' ADD `uniacid` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_store_current_log')){if(!pdo_fieldexists('tiny_wmall_store_current_log', 'sid')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_store_current_log').' ADD `sid` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_store_current_log')){if(!pdo_fieldexists('tiny_wmall_store_current_log', 'trade_type')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_store_current_log').' ADD `trade_type` tinyint(3) unsigned NOT NULL  DEFAULT 1 COMMENT \'1:订单入账, 2: 申请提现\';');}}if(pdo_tableexists('tiny_wmall_store_current_log')){if(!pdo_fieldexists('tiny_wmall_store_current_log', 'extra')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_store_current_log').' ADD `extra` varchar(255) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_store_current_log')){if(!pdo_fieldexists('tiny_wmall_store_current_log', 'fee')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_store_current_log').' ADD `fee` decimal(10,2) NOT NULL  DEFAULT 0.00 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_store_current_log')){if(!pdo_fieldexists('tiny_wmall_store_current_log', 'amount')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_store_current_log').' ADD `amount` decimal(10,2) NOT NULL  DEFAULT 0.00 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_store_current_log')){if(!pdo_fieldexists('tiny_wmall_store_current_log', 'addtime')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_store_current_log').' ADD `addtime` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_store_current_log')){if(!pdo_fieldexists('tiny_wmall_store_current_log', 'remark')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_store_current_log').' ADD `remark` varchar(255) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_store_delivery_times')){if(!pdo_fieldexists('tiny_wmall_store_delivery_times', 'id')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_store_delivery_times').' ADD `id` int(10) unsigned NOT NULL auto_increment  COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_store_delivery_times')){if(!pdo_fieldexists('tiny_wmall_store_delivery_times', 'uniacid')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_store_delivery_times').' ADD `uniacid` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_store_delivery_times')){if(!pdo_fieldexists('tiny_wmall_store_delivery_times', 'sid')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_store_delivery_times').' ADD `sid` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_store_delivery_times')){if(!pdo_fieldexists('tiny_wmall_store_delivery_times', 'start')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_store_delivery_times').' ADD `start` varchar(20) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_store_delivery_times')){if(!pdo_fieldexists('tiny_wmall_store_delivery_times', 'end')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_store_delivery_times').' ADD `end` varchar(20) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_store_deliveryer')){if(!pdo_fieldexists('tiny_wmall_store_deliveryer', 'id')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_store_deliveryer').' ADD `id` int(10) unsigned NOT NULL auto_increment  COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_store_deliveryer')){if(!pdo_fieldexists('tiny_wmall_store_deliveryer', 'uniacid')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_store_deliveryer').' ADD `uniacid` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_store_deliveryer')){if(!pdo_fieldexists('tiny_wmall_store_deliveryer', 'sid')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_store_deliveryer').' ADD `sid` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_store_deliveryer')){if(!pdo_fieldexists('tiny_wmall_store_deliveryer', 'deliveryer_id')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_store_deliveryer').' ADD `deliveryer_id` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_store_deliveryer')){if(!pdo_fieldexists('tiny_wmall_store_deliveryer', 'delivery_type')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_store_deliveryer').' ADD `delivery_type` tinyint(3) unsigned NOT NULL  DEFAULT 2 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_store_deliveryer')){if(!pdo_fieldexists('tiny_wmall_store_deliveryer', 'addtime')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_store_deliveryer').' ADD `addtime` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_store_favorite')){if(!pdo_fieldexists('tiny_wmall_store_favorite', 'id')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_store_favorite').' ADD `id` int(10) unsigned NOT NULL auto_increment  COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_store_favorite')){if(!pdo_fieldexists('tiny_wmall_store_favorite', 'uniacid')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_store_favorite').' ADD `uniacid` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_store_favorite')){if(!pdo_fieldexists('tiny_wmall_store_favorite', 'uid')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_store_favorite').' ADD `uid` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_store_favorite')){if(!pdo_fieldexists('tiny_wmall_store_favorite', 'sid')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_store_favorite').' ADD `sid` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_store_favorite')){if(!pdo_fieldexists('tiny_wmall_store_favorite', 'addtime')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_store_favorite').' ADD `addtime` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_store_getcash_log')){if(!pdo_fieldexists('tiny_wmall_store_getcash_log', 'id')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_store_getcash_log').' ADD `id` int(10) unsigned NOT NULL auto_increment  COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_store_getcash_log')){if(!pdo_fieldexists('tiny_wmall_store_getcash_log', 'uniacid')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_store_getcash_log').' ADD `uniacid` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_store_getcash_log')){if(!pdo_fieldexists('tiny_wmall_store_getcash_log', 'sid')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_store_getcash_log').' ADD `sid` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_store_getcash_log')){if(!pdo_fieldexists('tiny_wmall_store_getcash_log', 'trade_no')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_store_getcash_log').' ADD `trade_no` varchar(20) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_store_getcash_log')){if(!pdo_fieldexists('tiny_wmall_store_getcash_log', 'get_fee')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_store_getcash_log').' ADD `get_fee` decimal(10,2) unsigned NOT NULL  DEFAULT 0.00 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_store_getcash_log')){if(!pdo_fieldexists('tiny_wmall_store_getcash_log', 'take_fee')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_store_getcash_log').' ADD `take_fee` decimal(10,2) unsigned NOT NULL  DEFAULT 0.00 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_store_getcash_log')){if(!pdo_fieldexists('tiny_wmall_store_getcash_log', 'final_fee')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_store_getcash_log').' ADD `final_fee` decimal(10,2) unsigned NOT NULL  DEFAULT 0.00 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_store_getcash_log')){if(!pdo_fieldexists('tiny_wmall_store_getcash_log', 'account_type')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_store_getcash_log').' ADD `account_type` varchar(20) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_store_getcash_log')){if(!pdo_fieldexists('tiny_wmall_store_getcash_log', 'account')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_store_getcash_log').' ADD `account` varchar(500) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_store_getcash_log')){if(!pdo_fieldexists('tiny_wmall_store_getcash_log', 'status')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_store_getcash_log').' ADD `status` tinyint(3) unsigned NOT NULL  DEFAULT 2 COMMENT \'1:申请成功,2:申请中\';');}}if(pdo_tableexists('tiny_wmall_store_getcash_log')){if(!pdo_fieldexists('tiny_wmall_store_getcash_log', 'addtime')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_store_getcash_log').' ADD `addtime` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_store_getcash_log')){if(!pdo_fieldexists('tiny_wmall_store_getcash_log', 'endtime')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_store_getcash_log').' ADD `endtime` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_store_members')){if(!pdo_fieldexists('tiny_wmall_store_members', 'id')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_store_members').' ADD `id` int(10) unsigned NOT NULL auto_increment  COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_store_members')){if(!pdo_fieldexists('tiny_wmall_store_members', 'uniacid')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_store_members').' ADD `uniacid` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_store_members')){if(!pdo_fieldexists('tiny_wmall_store_members', 'sid')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_store_members').' ADD `sid` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_store_members')){if(!pdo_fieldexists('tiny_wmall_store_members', 'uid')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_store_members').' ADD `uid` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_store_members')){if(!pdo_fieldexists('tiny_wmall_store_members', 'openid')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_store_members').' ADD `openid` varchar(50) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_store_members')){if(!pdo_fieldexists('tiny_wmall_store_members', 'first_order_time')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_store_members').' ADD `first_order_time` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_store_members')){if(!pdo_fieldexists('tiny_wmall_store_members', 'last_order_time')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_store_members').' ADD `last_order_time` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_store_members')){if(!pdo_fieldexists('tiny_wmall_store_members', 'success_num')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_store_members').' ADD `success_num` int(10) unsigned   DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_store_members')){if(!pdo_fieldexists('tiny_wmall_store_members', 'success_price')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_store_members').' ADD `success_price` varchar(20) NOT NULL  DEFAULT 0.00 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_store_members')){if(!pdo_fieldexists('tiny_wmall_store_members', 'cancel_num')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_store_members').' ADD `cancel_num` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_store_members')){if(!pdo_fieldexists('tiny_wmall_store_members', 'cancel_price')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_store_members').' ADD `cancel_price` varchar(20) NOT NULL  DEFAULT 0.00 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_store_members')){if(!pdo_fieldexists('tiny_wmall_store_members', 'is_sys')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_store_members').' ADD `is_sys` tinyint(3) unsigned NOT NULL  DEFAULT 1 COMMENT \'1:系统会员, 2:模块兼容会员\';');}}if(pdo_tableexists('tiny_wmall_store_settle_config')){if(!pdo_fieldexists('tiny_wmall_store_settle_config', 'id')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_store_settle_config').' ADD `id` int(10) unsigned NOT NULL auto_increment  COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_store_settle_config')){if(!pdo_fieldexists('tiny_wmall_store_settle_config', 'uniacid')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_store_settle_config').' ADD `uniacid` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_store_settle_config')){if(!pdo_fieldexists('tiny_wmall_store_settle_config', 'status')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_store_settle_config').' ADD `status` tinyint(3) unsigned NOT NULL  DEFAULT 1 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_store_settle_config')){if(!pdo_fieldexists('tiny_wmall_store_settle_config', 'audit_status')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_store_settle_config').' ADD `audit_status` tinyint(3) unsigned NOT NULL  DEFAULT 2 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_store_settle_config')){if(!pdo_fieldexists('tiny_wmall_store_settle_config', 'mobile_verify_status')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_store_settle_config').' ADD `mobile_verify_status` tinyint(3) unsigned NOT NULL  DEFAULT 2 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_store_settle_config')){if(!pdo_fieldexists('tiny_wmall_store_settle_config', 'get_cash_fee_limit')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_store_settle_config').' ADD `get_cash_fee_limit` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_store_settle_config')){if(!pdo_fieldexists('tiny_wmall_store_settle_config', 'get_cash_fee_rate')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_store_settle_config').' ADD `get_cash_fee_rate` varchar(10) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_store_settle_config')){if(!pdo_fieldexists('tiny_wmall_store_settle_config', 'get_cash_fee_min')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_store_settle_config').' ADD `get_cash_fee_min` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_store_settle_config')){if(!pdo_fieldexists('tiny_wmall_store_settle_config', 'get_cash_fee_max')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_store_settle_config').' ADD `get_cash_fee_max` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_store_settle_config')){if(!pdo_fieldexists('tiny_wmall_store_settle_config', 'agreement')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_store_settle_config').' ADD `agreement` text    COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_tables')){if(!pdo_fieldexists('tiny_wmall_tables', 'id')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_tables').' ADD `id` int(10) unsigned NOT NULL auto_increment  COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_tables')){if(!pdo_fieldexists('tiny_wmall_tables', 'uniacid')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_tables').' ADD `uniacid` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_tables')){if(!pdo_fieldexists('tiny_wmall_tables', 'sid')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_tables').' ADD `sid` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_tables')){if(!pdo_fieldexists('tiny_wmall_tables', 'title')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_tables').' ADD `title` varchar(20) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_tables')){if(!pdo_fieldexists('tiny_wmall_tables', 'cid')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_tables').' ADD `cid` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_tables')){if(!pdo_fieldexists('tiny_wmall_tables', 'order_id')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_tables').' ADD `order_id` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'当前对应的订单id\';');}}if(pdo_tableexists('tiny_wmall_tables')){if(!pdo_fieldexists('tiny_wmall_tables', 'guest_num')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_tables').' ADD `guest_num` tinyint(3) unsigned   DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_tables')){if(!pdo_fieldexists('tiny_wmall_tables', 'scan_num')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_tables').' ADD `scan_num` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_tables')){if(!pdo_fieldexists('tiny_wmall_tables', 'qrcode')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_tables').' ADD `qrcode` varchar(500) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_tables')){if(!pdo_fieldexists('tiny_wmall_tables', 'displayorder')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_tables').' ADD `displayorder` tinyint(3) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_tables')){if(!pdo_fieldexists('tiny_wmall_tables', 'status')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_tables').' ADD `status` tinyint(3) unsigned NOT NULL  DEFAULT 1 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_tables')){if(!pdo_fieldexists('tiny_wmall_tables', 'createtime')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_tables').' ADD `createtime` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_tables_category')){if(!pdo_fieldexists('tiny_wmall_tables_category', 'id')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_tables_category').' ADD `id` int(10) unsigned NOT NULL auto_increment  COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_tables_category')){if(!pdo_fieldexists('tiny_wmall_tables_category', 'uniacid')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_tables_category').' ADD `uniacid` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_tables_category')){if(!pdo_fieldexists('tiny_wmall_tables_category', 'sid')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_tables_category').' ADD `sid` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_tables_category')){if(!pdo_fieldexists('tiny_wmall_tables_category', 'title')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_tables_category').' ADD `title` varchar(20) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_tables_category')){if(!pdo_fieldexists('tiny_wmall_tables_category', 'limit_price')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_tables_category').' ADD `limit_price` varchar(20) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_tables_category')){if(!pdo_fieldexists('tiny_wmall_tables_category', 'reservation_price')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_tables_category').' ADD `reservation_price` varchar(20) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_tables_scan')){if(!pdo_fieldexists('tiny_wmall_tables_scan', 'id')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_tables_scan').' ADD `id` int(10) unsigned NOT NULL auto_increment  COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_tables_scan')){if(!pdo_fieldexists('tiny_wmall_tables_scan', 'uniacid')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_tables_scan').' ADD `uniacid` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_tables_scan')){if(!pdo_fieldexists('tiny_wmall_tables_scan', 'sid')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_tables_scan').' ADD `sid` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_tables_scan')){if(!pdo_fieldexists('tiny_wmall_tables_scan', 'table_id')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_tables_scan').' ADD `table_id` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_tables_scan')){if(!pdo_fieldexists('tiny_wmall_tables_scan', 'openid')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_tables_scan').' ADD `openid` varchar(50) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_tables_scan')){if(!pdo_fieldexists('tiny_wmall_tables_scan', 'nickname')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_tables_scan').' ADD `nickname` varchar(50) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_tables_scan')){if(!pdo_fieldexists('tiny_wmall_tables_scan', 'avatar')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_tables_scan').' ADD `avatar` varchar(255) NOT NULL   COMMENT \'\';');}}if(pdo_tableexists('tiny_wmall_tables_scan')){if(!pdo_fieldexists('tiny_wmall_tables_scan', 'createtime')){pdo_query('ALTER TABLE '.tablename('tiny_wmall_tables_scan').' ADD `createtime` int(10) unsigned NOT NULL  DEFAULT 0 COMMENT \'\';');}}
?>